diff options
author | Scott González <scott.gonzalez@gmail.com> | 2010-09-27 10:10:00 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-09-27 10:10:00 -0400 |
commit | adcafce7a24156c503061eb354867e41064fd89f (patch) | |
tree | bcb0a933335f118161da3fe9589e54af5c51e5b4 /ui/jquery.ui.autocomplete.js | |
parent | dda7bcb6383ed0fee9dcd1ae5f0a6e1dcc160c6b (diff) | |
download | jquery-ui-adcafce7a24156c503061eb354867e41064fd89f.tar.gz jquery-ui-adcafce7a24156c503061eb354867e41064fd89f.zip |
Autocomplete: Only prevent the default action for enter when a menu item is active. Fixes #6038 - Autocomplete: Allow default behaviour on enter when menu is open but inactive.
Thanks Ján Suchal.
Diffstat (limited to 'ui/jquery.ui.autocomplete.js')
-rw-r--r-- | ui/jquery.ui.autocomplete.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js index 680a81f29..2d1d7f94b 100644 --- a/ui/jquery.ui.autocomplete.js +++ b/ui/jquery.ui.autocomplete.js @@ -63,8 +63,8 @@ $.widget( "ui.autocomplete", { break; case keyCode.ENTER: case keyCode.NUMPAD_ENTER: - // when menu is open or has focus - if ( self.menu.element.is( ":visible" ) ) { + // when menu is open and has focus + if ( self.menu.active ) { event.preventDefault(); } //passthrough - ENTER and TAB both select the current element |