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:
Patrick Filler 2011-07-20 12:38:34 -04:00
parent e9d0363e96
commit db9fd24889
4 changed files with 16 additions and 4 deletions

View file

@ -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:

View file

@ -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:

View file

@ -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()

View file

@ -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()