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:
Nathan Sobo
2013-02-14 13:38:46 -07:00
parent 58dbcc9ddc
commit 2f71ee9a0d

View File

@@ -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'))