Skip to content

Commit afdc577

Browse files
committed
Menu: Remove the isScrolling check which nolonger seems necessary.
1 parent a3a5c65 commit afdc577

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

ui/jquery.ui.menu.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ $.widget( "ui.menu", {
2929
},
3030
_create: function() {
3131
this.activeMenu = this.element;
32-
this.isScrolling = false;
3332
this.menuId = this.element.attr( "id" ) || "ui-menu-" + idIncrement++;
3433
if ( this.element.find( ".ui-icon" ).length ) {
3534
this.element.addClass( "ui-menu-icons" );
@@ -66,13 +65,10 @@ $.widget( "ui.menu", {
6665
},
6766
"mouseover .ui-menu-item": function( event ) {
6867
event.stopImmediatePropagation();
69-
if ( !this.isScrolling ) {
70-
var target = $( event.currentTarget );
71-
// 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
72-
target.siblings().children( ".ui-state-active" ).removeClass( "ui-state-active" );
73-
this.focus( event, target );
74-
}
75-
this.isScrolling = false;
68+
var target = $( event.currentTarget );
69+
// 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
70+
target.siblings().children( ".ui-state-active" ).removeClass( "ui-state-active" );
71+
this.focus( event, target );
7672
},
7773
"mouseleave": "collapseAll",
7874
"mouseleave .ui-menu": "collapseAll",
@@ -86,10 +82,6 @@ $.widget( "ui.menu", {
8682
this.collapseAll( event );
8783
}
8884
}, 0);
89-
},
90-
scroll: function( event ) {
91-
// Keep track of scrolling to prevent mouseover from firing inadvertently when scrolling the menu
92-
this.isScrolling = true;
9385
}
9486
});
9587

0 commit comments

Comments
 (0)