diff --git a/app.vue b/app.vue index c105499..8f0571f 100644 --- a/app.vue +++ b/app.vue @@ -23,14 +23,11 @@ onMounted(() => { contextMenuHandler(e); }); document.addEventListener("mousedown", (e) => { - if (e.target instanceof HTMLElement && e.target.classList.contains("context-menu-item")) return; + if (e.target instanceof HTMLElement && e.target.closest("#context-menu")) return; console.log("click"); console.log("target:", e.target); console.log(e.target instanceof HTMLDivElement); - if (contextMenu.value.show) { - console.log("context menu is shown, hiding"); - removeContextMenu(contextMenu); - } + removeContextMenu(contextMenu); if (e.target instanceof HTMLElement && e.target.classList.contains("message-text") && e.target.contentEditable) { e.target.contentEditable = "false"; } diff --git a/components/Guild/MemberEntry.vue b/components/Guild/MemberEntry.vue index a5f66fb..baf0e67 100644 --- a/components/Guild/MemberEntry.vue +++ b/components/Guild/MemberEntry.vue @@ -1,5 +1,5 @@