diff --git a/src/IPC.js b/src/IPC.js
index 4ad41d18..0c021713 100644
--- a/src/IPC.js
+++ b/src/IPC.js
@@ -426,6 +426,7 @@ window.addEventListener('message', async (event) => {
html: item.label,
icon: item.icon ? `` : undefined,
icon_active: item.icon_active ? `` : undefined,
+ disabled: item.disabled,
onClick: () => {
if (item.action !== undefined) {
item.action();
diff --git a/src/UI/UIContextMenu.js b/src/UI/UIContextMenu.js
index c37d3937..9b5a174e 100644
--- a/src/UI/UIContextMenu.js
+++ b/src/UI/UIContextMenu.js
@@ -261,7 +261,14 @@ function UIContextMenu(options){
}
});
- // Useful in cases such as where a menu item is over a window, this prevents from the mousedown event
+ // disabled item mousedown event
+ $(`#context-menu-${menu_id} > li.context-menu-item-disabled`).on('mousedown', function (e) {
+ e.preventDefault();
+ e.stopPropagation();
+ return false;
+ })
+
+ // Useful in cases such as where a menu item is over a window, this prevents the mousedown event from
// reaching the window underneath
$(`#context-menu-${menu_id} > li:not(.context-menu-item-disabled)`).on('mousedown', function (e) {
e.preventDefault();