Skip to content
Permalink
Browse files

Widget delegation: Put back the simple click event handler where it was.

  • Loading branch information
jzaefferer committed Jul 28, 2011
1 parent 5b45d61 commit 5e35a0c55b9dd7070cda7b5fb6fc1f031e04ae3e
Showing with 7 additions and 5 deletions.
  1. +7 −5 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();

0 comments on commit 5e35a0c

Please sign in to comment.
You can’t perform that action at this time.