mirror of
https://github.com/atom/atom.git
synced 2026-02-11 23:25:03 -05:00
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.
This commit is contained in:
@@ -29,8 +29,8 @@ class FuzzyFinder extends SelectList
|
||||
|
||||
confirmed : (path) ->
|
||||
return unless path.length
|
||||
@cancel()
|
||||
@rootView.open(path, {@allowActiveEditorChange})
|
||||
@detach()
|
||||
|
||||
cancelled: ->
|
||||
@miniEditor.setText('')
|
||||
|
||||
Reference in New Issue
Block a user