From 2f71ee9a0d1945feba35e9a200ee09e77f5ad0ac Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Thu, 14 Feb 2013 13:38:46 -0700 Subject: [PATCH] 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. --- src/app/editor.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/editor.coffee b/src/app/editor.coffee index c6dfe8d8a..2dc140b12 100644 --- a/src/app/editor.coffee +++ b/src/app/editor.coffee @@ -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'))