We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fa51311 commit 01a9369Copy full SHA for 01a9369
jquery.ui-contextmenu.js
@@ -136,8 +136,7 @@
136
// User selected a menu entry
137
var retval,
138
isParent = (ui.item.has(">a[aria-haspopup='true']").length > 0),
139
- $a = ui.item.find(">a"),
140
- actionHandler = $a.data("actionHandler");
+ actionHandler = ui.item.data("actionHandler");
141
ui.cmd = ui.item.attr("data-command");
142
ui.target = $(this.currentTarget);
143
// ignore clicks, if they only open a sub-menu
@@ -332,7 +331,7 @@ $.extend($.moogle.contextmenu, {
332
331
href: "#"
333
}).appendTo($parentLi);
334
if( $.isFunction(entry.action) ){
335
- $a.data("actionHandler", entry.action);
+ $parentLi.data("actionHandler", entry.action);
336
}
337
if(entry.uiIcon){
338
$a.append($("<span class='ui-icon' />").addClass(entry.uiIcon));
0 commit comments