Skip to content

Commit bb8e2e0

Browse files
author
Steven G. Harms
committed
menubar: re-open submenu when returning to it after hover on menu-less item
Per @jzaefferer: > Something I didn't write down on the wiki page, > but seems like it should get adressed: When > clicking to open a submenu, hovering the > non-menu-item closes the menu, and another hover > on the closed menu should probably reopen it, > instead of requiring another click. When it gets > closed by a click, it should require the click to > reopen. If that makes sense to you to, we can put > it on the wiki.
1 parent 908fea5 commit bb8e2e0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ui/jquery.ui.menubar.js

+5
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,10 @@ $.widget( "ui.menubar", {
232232
}
233233
if ( event.type === "mouseenter" ) {
234234
this.element.find(":focus").focusout();
235+
if ( this.stashedOpenMenu ) {
236+
this._open( event, menu);
237+
}
238+
this.stashedOpenMenu = undefined;
235239
}
236240
if ( ( this.open && event.type === "mouseenter" ) || event.type === "click" || this.options.autoExpand ) {
237241
if ( this.options.autoExpand ) {
@@ -287,6 +291,7 @@ $.widget( "ui.menubar", {
287291
},
288292
mouseenter: function( event ) {
289293
if ( this.open ) {
294+
this.stashedOpenMenu = this.active;
290295
this._close();
291296
}
292297
}

0 commit comments

Comments
 (0)