mirror of
https://github.com/atom/atom.git
synced 2026-02-05 04:05:05 -05:00
Prevent clicks on a focused editor from unfocusing its hidden input
This closes #233. When an editor is focused, what's *actually* focused is a hidden input element inside the editor. So clicking on a focused editor was temporarily stealing focus away from the hidden input, and then moving it back to the hidden input (which the editor always does when it is focused). Returning false from the mousedown handler when the editor is already focused prevents this bouncing of focus and prevents the fuzzy finder from hiding when you click its editor.
This commit is contained in:
@@ -379,6 +379,7 @@ class Editor extends View
|
||||
@overlayer.show()
|
||||
e.target = clickedElement
|
||||
$(clickedElement).trigger(e)
|
||||
false if @isFocused
|
||||
|
||||
@renderedLines.on 'mousedown', '.fold.line', (e) =>
|
||||
@destroyFold($(e.currentTarget).attr('fold-id'))
|
||||
|
||||
Reference in New Issue
Block a user