Searchable Select: prevent modal closes when closing a autocompletion dropdown
This commit is contained in:
parent
9a09532718
commit
fbf6133dfd
1 changed files with 4 additions and 2 deletions
|
@ -140,11 +140,13 @@ class App.SearchableSelect extends Spine.Controller
|
|||
when 39 then @autocompleteOrNavigateIn event # right
|
||||
when 37 then @autocompleteOrNavigateOut event # left
|
||||
when 13 then @onEnter event
|
||||
when 27 then @onEscape()
|
||||
when 27 then @onEscape event
|
||||
when 9 then @onTab event
|
||||
|
||||
onEscape: ->
|
||||
@toggle() if @isOpen
|
||||
if @isOpen
|
||||
event.stopPropagation() # if the input is in a modal, prevent the modal from closing
|
||||
@toggle()
|
||||
|
||||
getCurrentOptions: ->
|
||||
@currentMenu.find('.js-option, .js-enter, .js-back')
|
||||
|
|
Loading…
Reference in a new issue