mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
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.
This commit is contained in:
parent
123467af8e
commit
e85615fc6b
2
ui/jquery.ui.autocomplete.js
vendored
2
ui/jquery.ui.autocomplete.js
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user