Skip to content

Conversation

@scottgonzalez
Copy link
Member

Fixes #9357

@jsf-clabot
Copy link

jsf-clabot commented Apr 18, 2017

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

"mousedown .ui-menu-item": function( event ) {
event.preventDefault();

this._activateItem( event );
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We activate on mousedown to handle the scenario of moving the mouse over an item, navigating away from that item with they keyboard, then clicking with the mouse. Since we won't get a mouseenter or mousemove, we need to activate on mousedown. This matches the OS X menu behavior.

}
}
},
"mouseenter .ui-menu-item": function( event ) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method was moved to _activateItem().

// If the item is already active, there's nothing to do
if ( target.is( ".ui-state-active" ) ) {
return;
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This conditional is the only thing that changed in this method. This is just the avoid the expensive work that follows.

@scottgonzalez scottgonzalez deleted the menu-mouse branch May 2, 2017 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants