]> source.dussan.org Git - jquery-ui.git/commitdiff
Autocomplete: Prevent the default behavior of pressing enter when the menu is open...
authorScott González <scott.gonzalez@gmail.com>
Tue, 20 Jul 2010 19:13:54 +0000 (15:13 -0400)
committerScott González <scott.gonzalez@gmail.com>
Tue, 20 Jul 2010 19:13:54 +0000 (15:13 -0400)
ui/jquery.ui.autocomplete.js

index b9daad86bea96d77eff332e9a6daefc08be301b0..4b37a000daa6e5976c834e4738594aa78add8571 100644 (file)
@@ -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