aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkborchers <k_borchers@yahoo.com>2011-05-09 16:22:11 -0500
committerkborchers <k_borchers@yahoo.com>2011-05-09 16:22:11 -0500
commit73ed73890c0e91430a6dc2a01a971f9a4586a6e0 (patch)
tree7645fef335040f5132b52d2a9d491d5aa72f05fe
parentaf5b5b19483a0a18abe1fbb43cb534a5485f0804 (diff)
downloadjquery-ui-73ed73890c0e91430a6dc2a01a971f9a4586a6e0.tar.gz
jquery-ui-73ed73890c0e91430a6dc2a01a971f9a4586a6e0.zip
Autocomplete: Added check to determine if menu has just been created to override mouseover event and reset that variable from autocomplete on close. Fixed #7024 - Autocomplete menu options are activated even if mouse is not moved
-rw-r--r--ui/jquery.ui.autocomplete.js1
-rw-r--r--ui/jquery.ui.menu.js4
2 files changed, 4 insertions, 1 deletions
diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js
index 526eb3869..e388a63bd 100644
--- a/ui/jquery.ui.autocomplete.js
+++ b/ui/jquery.ui.autocomplete.js
@@ -338,6 +338,7 @@ $.widget( "ui.autocomplete", {
this.menu.element.hide();
this.menu.blur();
this._trigger( "close", event );
+ this.menu.isNewMenu = true;
}
},
diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js
index 0841018af..3cc25062c 100644
--- a/ui/jquery.ui.menu.js
+++ b/ui/jquery.ui.menu.js
@@ -18,6 +18,7 @@ var idIncrement = 0;
$.widget("ui.menu", {
defaultElement: "<ul>",
delay: 150,
+ isNewMenu: true,
options: {
position: {
my: "left top",
@@ -54,7 +55,8 @@ $.widget("ui.menu", {
self.select( event );
})
.bind( "mouseover.menu", function( event ) {
- if ( self.options.disabled ) {
+ if ( self.options.disabled || self.isNewMenu ) {
+ self.isNewMenu = false;
return;
}
var target = $( event.target ).closest( ".ui-menu-item" );