Do not run menu action if the menuitem is disabled
The click event can still be triggered by the shortcut or event by clicking on the disabled menuitem. So the callback must not run the action if the menuitem is disabled. Closes #13326
This commit is contained in:
+3
-1
@@ -158,7 +158,9 @@
|
||||
this.menu_buttons[item.id] = menuitem;
|
||||
link.click(evt => {
|
||||
evt.preventDefault();
|
||||
this[item.id]();
|
||||
if (!menuitem.hasClass('disabled')) {
|
||||
this[item.id]();
|
||||
}
|
||||
});
|
||||
} else if (!item && previous) {
|
||||
menuitem = jQuery('<li/>', {
|
||||
|
||||
Reference in New Issue
Block a user