diff --git a/spec/extensions/command-panel-spec.coffee b/spec/extensions/command-panel-spec.coffee index d5c363f01..6617a8b07 100644 --- a/spec/extensions/command-panel-spec.coffee +++ b/spec/extensions/command-panel-spec.coffee @@ -188,12 +188,12 @@ describe "CommandPanel", -> describe "when the command panel is not visible", -> it "shows the command panel and focuses the mini editor, but does not show the preview list", -> - describe "when core:cancel is triggered on the command panel", -> + describe "when tool-pane:unfocus is triggered on the command panel", -> it "returns focus to the root view but does not hide the command panel", -> rootView.attachToDom() commandPanel.attach() expect(commandPanel.miniEditor.hiddenInput).toMatchSelector ':focus' - commandPanel.trigger 'core:cancel' + commandPanel.trigger 'tool-pane:unfocus' expect(commandPanel.hasParent()).toBeTruthy() expect(commandPanel.miniEditor.hiddenInput).not.toMatchSelector ':focus' diff --git a/src/extensions/command-panel/command-panel.coffee b/src/extensions/command-panel/command-panel.coffee index 4e6f0d915..4cc535e9e 100644 --- a/src/extensions/command-panel/command-panel.coffee +++ b/src/extensions/command-panel/command-panel.coffee @@ -33,7 +33,7 @@ class CommandPanel extends View commandPanel @content: (rootView) -> - @div class: 'command-panel', => + @div class: 'command-panel tool-pane', => @subview 'previewList', new PreviewList(rootView) @div class: 'prompt-and-editor', => @div ':', class: 'prompt', outlet: 'prompt' @@ -50,7 +50,7 @@ class CommandPanel extends View @history ?= [] @historyIndex = @history.length - @command 'core:cancel', => @rootView.focus() + @command 'tool-pane:unfocus', => @rootView.focus() @command 'core:close', => @detach() @command 'core:confirm', => @execute()