Skip to content

Commit e85615f

Browse files
committed
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.
1 parent 123467a commit e85615f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/jquery.ui.autocomplete.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ $.widget( "ui.autocomplete", {
5959
case keyCode.ENTER:
6060
case keyCode.NUMPAD_ENTER:
6161
// when menu is open or has focus
62-
if ( self.menu.active ) {
62+
if ( self.menu.element.is( ":visible" ) ) {
6363
event.preventDefault();
6464
}
6565
//passthrough - ENTER and TAB both select the current element

0 commit comments

Comments
 (0)