From a4c25f1cb71b71184116d8046b52bafc5ad27646 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Wed, 3 Oct 2012 20:59:03 -1000 Subject: [PATCH] Fix bug where editor was not focused when selecting a path in fuzzy finder This is hard to test. What was happening before is that the opening of the file in the editor was causing the mini editor in the fuzzy finder to be unfocused, which was then triggering the mini editor to cancel. Some strange interaction of a focus triggered by a focus was causing the editor to actually lose focus. By using @cancel to close the editor instead of @detach, we avoid spurious handling of the unfocusing of the editor because @cancel already avoids that. --- src/extensions/fuzzy-finder/fuzzy-finder.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extensions/fuzzy-finder/fuzzy-finder.coffee b/src/extensions/fuzzy-finder/fuzzy-finder.coffee index 972ccd6ab..f5a97d8a4 100644 --- a/src/extensions/fuzzy-finder/fuzzy-finder.coffee +++ b/src/extensions/fuzzy-finder/fuzzy-finder.coffee @@ -29,8 +29,8 @@ class FuzzyFinder extends SelectList confirmed : (path) -> return unless path.length + @cancel() @rootView.open(path, {@allowActiveEditorChange}) - @detach() cancelled: -> @miniEditor.setText('')