Modal panel focusout


More time gone since run-in-terminal was made and I did not check all functionality on newer and newer atom versions, but it looks like something is broken now.
I have modal window for text input:

class ArgumentsRequester
    constructor: (label_text) ->
        @root = document.createElement("div")
        @message = document.createElement("div")
        @message.textContent = label_text
        @line_edit_model = atom.workspace.buildTextEditor(mini: true)
        @line_edit_view = atom.views.getView(@line_edit_model)
        @panel = atom.workspace.addModalPanel({
            item: @root,
            visible: false,
        @line_edit_view.addEventListener("focusout", @save_and_hide)
        @line_edit_view.addEventListener("keydown", @key_pressed)
        @attributes_memory = {}
    destroy: ->
    show: (@path) ->
        if not @panel.isVisible()
            @line_edit_model.setText(@attributes_memory[@path] or "")
    save_and_hide: =>
        console.log("save and hide")
        @attributes_memory[@path] = @line_edit_model.getText()
    key_pressed: (e) =>
        console.log("key pressed")
        switch e.keyCode
            when 27
            when 13
                start_terminal(@path or "", @line_edit_model.getText())

In console I got:

save and hide

So, the focusout event triggers and I don’t know why. And it does not matter start sequence from context menu or by shortcut.
If I comment @line_edit_view.focus(), then there is no “focusout” event, but line edit have no focus as expected.