summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ui/jquery.ui.autocomplete.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js
index ee923b2f4..2fc893cab 100644
--- a/ui/jquery.ui.autocomplete.js
+++ b/ui/jquery.ui.autocomplete.js
@@ -50,11 +50,11 @@ $.widget( "ui.autocomplete", {
break;
case keyCode.ENTER:
// when menu is open or has focus
- if ( self.menu && self.menu.active ) {
+ if ( self.menu.active ) {
event.preventDefault();
}
case keyCode.TAB:
- if ( !self.menu || !self.menu.active ) {
+ if ( !self.menu.active ) {
return;
}
self.menu.select();
@@ -209,6 +209,7 @@ $.widget( "ui.autocomplete", {
if ( this.menu.element.is(":visible") ) {
this._trigger( "close", event );
this.menu.element.hide();
+ this.menu.deactivate();
}
if ( this.previous != this.element.val() ) {
this._trigger( "change", event );