diff options
Diffstat (limited to 'ui/jquery.ui.menu.js')
-rw-r--r-- | ui/jquery.ui.menu.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js index b8affd168..c2890502c 100644 --- a/ui/jquery.ui.menu.js +++ b/ui/jquery.ui.menu.js @@ -37,12 +37,14 @@ $.widget( "ui.menu", { .attr({ id: this.menuId, role: "menu" + }) + // need to catch all clicks on disabled menu + // not possible through _bind + .bind("click.menu", function( event ) { + if ( self.options.disabled ) { + event.preventDefault(); + } }); - this.element.bind("click.menu", function( event ) { - if ( self.options.disabled ) { - event.preventDefault(); - } - }); this._bind({ "click .ui-menu-item:has(a)": function( event ) { event.stopImmediatePropagation(); |