diff options
Diffstat (limited to 'ui/jquery.ui.menu.js')
-rw-r--r-- | ui/jquery.ui.menu.js | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js index 86ef4577e..f160f8e6b 100644 --- a/ui/jquery.ui.menu.js +++ b/ui/jquery.ui.menu.js @@ -39,7 +39,8 @@ $.widget( "ui.menu", { _create: function() { this.activeMenu = this.element; - // flag used to prevent firing of the click handler + + // Flag used to prevent firing of the click handler // as the event bubbles up through nested menus this.mouseHandled = false; this.element @@ -49,14 +50,7 @@ $.widget( "ui.menu", { .attr({ role: this.options.role, tabIndex: 0 - }) - // need to catch all clicks on disabled menu - // not possible through _on - .bind( "click" + this.eventNamespace, $.proxy(function( event ) { - if ( this.options.disabled ) { - event.preventDefault(); - } - }, this )); + }); if ( this.options.disabled ) { this.element |