aboutsummaryrefslogtreecommitdiffstats
path: root/ui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'ui/widgets')
-rw-r--r--ui/widgets/menu.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/ui/widgets/menu.js b/ui/widgets/menu.js
index 5df9d3eef..302d202ae 100644
--- a/ui/widgets/menu.js
+++ b/ui/widgets/menu.js
@@ -64,6 +64,7 @@ return $.widget( "ui.menu", {
// Flag used to prevent firing of the click handler
// as the event bubbles up through nested menus
this.mouseHandled = false;
+ this.lastMousePosition = { x: null, y: null };
this.element
.uniqueId()
.attr( {
@@ -161,6 +162,17 @@ return $.widget( "ui.menu", {
return;
}
+ // If the mouse didn't actually move, but the page was scrolled, ignore the event (#9356)
+ if ( event.clientX === this.lastMousePosition.x &&
+ event.clientY === this.lastMousePosition.y ) {
+ return;
+ }
+
+ this.lastMousePosition = {
+ x: event.clientX,
+ y: event.clientY
+ };
+
var actualTarget = $( event.target ).closest( ".ui-menu-item" ),
target = $( event.currentTarget );