Permalink
Browse files

Autocomplete: Prevent the default behavior of pressing enter when the…

… menu is open, even if no item is active. Partial fix for #5757 - Autocomplete combobox issues.
  • Loading branch information...
scottgonzalez committed Jul 20, 2010
1 parent 123467a commit e85615fc6b1d636f4bcea3abd3a6091f937858b8
Showing with 1 addition and 1 deletion.
  1. +1 −1 ui/jquery.ui.autocomplete.js
@@ -59,7 +59,7 @@ $.widget( "ui.autocomplete", {
case keyCode.ENTER:
case keyCode.NUMPAD_ENTER:
// when menu is open or has focus
- if ( self.menu.active ) {
+ if ( self.menu.element.is( ":visible" ) ) {
event.preventDefault();
}
//passthrough - ENTER and TAB both select the current element

0 comments on commit e85615f

Please sign in to comment.