diff options
author | Scott González <scott.gonzalez@gmail.com> | 2010-04-23 13:00:54 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-04-23 13:00:54 -0400 |
commit | cb7eb69973c62f26bcde0325a33a5c837bc9b5e9 (patch) | |
tree | 080587d87654de4b30644a7e56f06df3295a0e8a | |
parent | 3570c1f768244b252cad86ac0f8707de0234fe6c (diff) | |
download | jquery-ui-cb7eb69973c62f26bcde0325a33a5c837bc9b5e9.tar.gz jquery-ui-cb7eb69973c62f26bcde0325a33a5c837bc9b5e9.zip |
Autocomplete: Ignore command (left and right/menu/windows), insert, caps lock, home, end keys.
Fixes #5415 - Catch all common keys while typing a word.
-rw-r--r-- | ui/jquery.ui.autocomplete.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js index 070045d16..64c098aa0 100644 --- a/ui/jquery.ui.autocomplete.js +++ b/ui/jquery.ui.autocomplete.js @@ -51,6 +51,7 @@ $.widget( "ui.autocomplete", { event.preventDefault(); break; case keyCode.ENTER: + case keyCode.NUMPAD_ENTER: // when menu is open or has focus if ( self.menu.active ) { event.preventDefault(); @@ -71,6 +72,12 @@ $.widget( "ui.autocomplete", { case keyCode.SHIFT: case keyCode.CONTROL: case keyCode.ALT: + case keyCode.COMMAND: + case keyCode.COMMAND_RIGHT: + case keyCode.INSERT: + case keyCode.CAPS_LOCK: + case keyCode.END: + case keyCode.HOME: // ignore metakeys (shift, ctrl, alt) break; default: |