In standard dropdowns, you can hit Escape (on your keyboard) to cancel form entry and close the dropdown.
Gh-16
This commit is contained in:
parent
e9d0363e96
commit
db9fd24889
|
@ -607,8 +607,12 @@
|
|||
return this.result_select();
|
||||
}
|
||||
break;
|
||||
case 27:
|
||||
if (this.results_showing) {
|
||||
return this.results_hide();
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
case 13:
|
||||
case 38:
|
||||
case 40:
|
||||
case 16:
|
||||
|
|
|
@ -610,8 +610,12 @@
|
|||
return this.result_select();
|
||||
}
|
||||
break;
|
||||
case 27:
|
||||
if (this.results_showing) {
|
||||
return this.results_hide();
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
case 13:
|
||||
case 38:
|
||||
case 40:
|
||||
case 16:
|
||||
|
|
|
@ -520,7 +520,9 @@ class Chosen
|
|||
when 13
|
||||
evt.preventDefault()
|
||||
this.result_select() if this.results_showing
|
||||
when 9, 13, 38, 40, 16
|
||||
when 27
|
||||
this.results_hide() if @results_showing
|
||||
when 9, 38, 40, 16
|
||||
# don't do anything on these keys
|
||||
else this.results_search()
|
||||
|
||||
|
|
|
@ -513,7 +513,9 @@ class Chosen
|
|||
when 13
|
||||
evt.preventDefault()
|
||||
this.result_select() if this.results_showing
|
||||
when 9, 13, 38, 40, 16
|
||||
when 27
|
||||
this.results_hide() if @results_showing
|
||||
when 9, 38, 40, 16
|
||||
# don't do anything on these keys
|
||||
else this.results_search()
|
||||
|
||||
|
|
Loading…
Reference in a new issue