Permalink
Browse files

Autocomplete: Ignore command (left and right/menu/windows), insert, c…

…aps lock, home, end keys.

Fixes #5415 - Catch all common keys while typing a word.
  • Loading branch information...
1 parent 3570c1f commit cb7eb69973c62f26bcde0325a33a5c837bc9b5e9 @scottgonzalez scottgonzalez committed Apr 23, 2010
Showing with 7 additions and 0 deletions.
  1. +7 −0 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:

0 comments on commit cb7eb69

Please sign in to comment.