Focus returns to tree view when a dialog is canceled with escape

This commit is contained in:
Corey Johnson & Nathan Sobo
2012-04-30 09:25:45 -07:00
parent daa051339c
commit d0b255e57b
2 changed files with 4 additions and 5 deletions

View File

@@ -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