From e85615fc6b1d636f4bcea3abd3a6091f937858b8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Tue, 20 Jul 2010 15:13:54 -0400 Subject: [PATCH] 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. --- ui/jquery.ui.autocomplete.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js index b9daad86b..4b37a000d 100644 --- a/ui/jquery.ui.autocomplete.js +++ b/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 -- 2.39.5