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