Context Menu: Fix for elements with a context-menu attribute but...

...without an entry in `context_menu_items`.
This commit is contained in:
somebody
2023-07-21 15:40:07 -05:00
parent e5d0a597a1
commit 6e7b0794ea

View File

@@ -6153,6 +6153,10 @@ process_cookies();
// Show only applicable actions in the context menu
let contextMenuType = target.getAttribute("context-menu");
// If context menu is not present, return
if (!context_menu_actions[contextMenuType]) return;
for (const contextMenuItem of contextMenu.childNodes) {
let shouldShow = contextMenuItem.classList.contains(`context-menu-${contextMenuType}`);