mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
Clear the miniEditor when showing the event palette
This commit is contained in:
@@ -24,6 +24,12 @@ describe "EventPalette", ->
|
||||
expect(palette.miniEditor.isFocused).toBeTruthy()
|
||||
expect(palette.find('.event:first')).toHaveClass 'selected'
|
||||
|
||||
it "clears the previous mini editor text", ->
|
||||
palette.miniEditor.setText('hello')
|
||||
palette.trigger 'event-palette:toggle'
|
||||
rootView.trigger 'event-palette:toggle'
|
||||
expect(palette.miniEditor.getText()).toBe ''
|
||||
|
||||
describe "when event-palette:toggle is triggered on the open event palette", ->
|
||||
it "focus the root view and detaches the event palette", ->
|
||||
expect(palette.hasParent()).toBeTruthy()
|
||||
|
||||
@@ -23,6 +23,7 @@ class EventPalette extends SelectList
|
||||
@previouslyFocusedElement = $(':focus')
|
||||
@setArray(@previouslyFocusedElement.events())
|
||||
@appendTo(@rootView)
|
||||
@miniEditor.setText('')
|
||||
@miniEditor.focus()
|
||||
|
||||
itemForElement: ([eventName, description]) ->
|
||||
|
||||
Reference in New Issue
Block a user