diff --git a/spec/extensions/tree-view-spec.coffee b/spec/extensions/tree-view-spec.coffee index 00727c863..14a034072 100644 --- a/spec/extensions/tree-view-spec.coffee +++ b/spec/extensions/tree-view-spec.coffee @@ -339,11 +339,11 @@ describe "TreeView", -> expect(dirView.entries.children().length).toBe 0 describe "when 'tree-view:cancel' is triggered on the move dialog", -> - it "removes the dialog and focuses root view", -> - rootView.attachToDom() + it "removes the dialog and focuses the tree view", -> + treeView.attachToDom() moveDialog.trigger 'tree-view:cancel' expect(moveDialog.parent()).not.toExist() - expect(rootView.activeEditor().isFocused).toBeTruthy() + expect(treeView).toMatchSelector(':focus') describe "when the move dialog's editor loses focus", -> it "removes the dialog and focuses root view", -> @@ -351,7 +351,6 @@ describe "TreeView", -> rootView.focus() expect(moveDialog.parent()).not.toExist() expect(rootView.activeEditor().isFocused).toBeTruthy() - # expect(rootView).toMatchSelector(':focus') describe "file system events", -> temporaryFilePath = null diff --git a/src/extensions/tree-view.coffee b/src/extensions/tree-view.coffee index 8ec2da739..1c021722a 100644 --- a/src/extensions/tree-view.coffee +++ b/src/extensions/tree-view.coffee @@ -180,5 +180,5 @@ class MoveDialog extends View cancel: -> @remove() - $('#root-view').focus() + $('.tree-view').focus()