aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.menu.js
diff options
context:
space:
mode:
authorDan Wellman <danwellman@hotmail.com>2011-12-01 15:56:36 +0000
committerDan Wellman <danwellman@hotmail.com>2011-12-01 15:56:36 +0000
commit041de0716c6c3e81fe4f9f5d1a9c9c4447d8710a (patch)
tree00f5de162b9f57c5bf8f4660e9d94d20fc40f2ea /ui/jquery.ui.menu.js
parent7d5238ad632d16da2b1e5c2af289c1a3381f5dd0 (diff)
parentb539e2e5c8528fb1cfaa241fd509fc1ccf65a095 (diff)
downloadjquery-ui-041de0716c6c3e81fe4f9f5d1a9c9c4447d8710a.tar.gz
jquery-ui-041de0716c6c3e81fe4f9f5d1a9c9c4447d8710a.zip
Merge branch 'selectmenu' of git://github.com/jquery/jquery-ui into selectmenu
Diffstat (limited to 'ui/jquery.ui.menu.js')
-rw-r--r--ui/jquery.ui.menu.js16
1 files changed, 4 insertions, 12 deletions
diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js
index 4fe859f4e..77190189e 100644
--- a/ui/jquery.ui.menu.js
+++ b/ui/jquery.ui.menu.js
@@ -29,7 +29,6 @@ $.widget( "ui.menu", {
},
_create: function() {
this.activeMenu = this.element;
- this.isScrolling = false;
this.menuId = this.element.attr( "id" ) || "ui-menu-" + idIncrement++;
if ( this.element.find( ".ui-icon" ).length ) {
this.element.addClass( "ui-menu-icons" );
@@ -66,13 +65,10 @@ $.widget( "ui.menu", {
},
"mouseover .ui-menu-item": function( event ) {
event.stopImmediatePropagation();
- if ( !this.isScrolling ) {
- var target = $( event.currentTarget );
- // Remove ui-state-active class from siblings of the newly focused menu item to avoid a jump caused by adjacent elements both having a class with a border
- target.siblings().children( ".ui-state-active" ).removeClass( "ui-state-active" );
- this.focus( event, target );
- }
- this.isScrolling = false;
+ var target = $( event.currentTarget );
+ // Remove ui-state-active class from siblings of the newly focused menu item to avoid a jump caused by adjacent elements both having a class with a border
+ target.siblings().children( ".ui-state-active" ).removeClass( "ui-state-active" );
+ this.focus( event, target );
},
"mouseleave": "collapseAll",
"mouseleave .ui-menu": "collapseAll",
@@ -86,10 +82,6 @@ $.widget( "ui.menu", {
this.collapseAll( event );
}
}, 0);
- },
- scroll: function( event ) {
- // Keep track of scrolling to prevent mouseover from firing inadvertently when scrolling the menu
- this.isScrolling = true;
}
});