mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Fix collapsing submenus issue
This commit is contained in:
parent
42e11d8e41
commit
84f918ae44
4
ui/jquery.ui.menu.js
vendored
4
ui/jquery.ui.menu.js
vendored
@ -283,17 +283,15 @@ $.widget("ui.menu", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_open: function(submenu) {
|
_open: function(submenu) {
|
||||||
|
clearTimeout(this.timer);
|
||||||
this.element.find(".ui-menu").not(submenu.parents()).hide().attr("aria-hidden", "true");
|
this.element.find(".ui-menu").not(submenu.parents()).hide().attr("aria-hidden", "true");
|
||||||
|
|
||||||
var position = $.extend({}, {
|
var position = $.extend({}, {
|
||||||
of: this.active
|
of: this.active
|
||||||
}, $.type(this.options.position) == "function"
|
}, $.type(this.options.position) == "function"
|
||||||
? this.options.position(this.active)
|
? this.options.position(this.active)
|
||||||
: this.options.position
|
: this.options.position
|
||||||
);
|
);
|
||||||
|
|
||||||
submenu.show().removeAttr("aria-hidden").attr("aria-expanded", "true").position(position);
|
submenu.show().removeAttr("aria-hidden").attr("aria-expanded", "true").position(position);
|
||||||
|
|
||||||
this.active.find(">a:first").addClass("ui-state-active");
|
this.active.find(">a:first").addClass("ui-state-active");
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user