mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Context Menu: Fix for elements with a context-menu attribute but...
...without an entry in `context_menu_items`.
This commit is contained in:
@@ -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}`);
|
||||
|
||||
|
Reference in New Issue
Block a user