Skip to content

Commit 30e9f72

Browse files
committed
Fixed markup for disabled entries
1 parent 9606e82 commit 30e9f72

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

jquery.ui-contextmenu.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,7 @@
254254
.first()
255255
.replaceWith(titleOrData);
256256
}else{
257-
$parent = $entry.closest("li");
258-
$parent.empty();
257+
$parent = $entry.closest("li").empty();
259258
$.ui.contextmenu.createEntryMarkup(titleOrData, $parent);
260259
}
261260
},
@@ -285,7 +284,7 @@ $.extend($.ui.contextmenu, {
285284
$a.append($("<span class='ui-icon'>").addClass(entry.uiIcon));
286285
}
287286
if(entry.disabled){
288-
$a.addClass("ui-state-disabled");
287+
$parentLi.addClass("ui-state-disabled");
289288
}
290289
}
291290
return $a;

0 commit comments

Comments
 (0)