diff --git a/src/atom/root-view.coffee b/src/atom/root-view.coffee index 360dbae5c..cdf337226 100644 --- a/src/atom/root-view.coffee +++ b/src/atom/root-view.coffee @@ -33,7 +33,9 @@ class RootView extends Template @on 'toggle-file-finder', => @toggleFileFinder() @on 'focusout', (e) => - @editor.focus() unless e.target is @editor.find('input')[0] + # if anything but the editor and its input loses focus, restore focus to the editor + unless $(e.target).closest('.editor').length + @editor.focus() createProject: (url) -> if url