From b9acda11573c4e1d2e09346862a892496b77bc62 Mon Sep 17 00:00:00 2001 From: N-Pex Date: Fri, 19 Jul 2024 14:38:06 +0200 Subject: [PATCH] Allow three dot menu to be opened on another message... without closing the first. --- src/components/Chat.vue | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/components/Chat.vue b/src/components/Chat.vue index 133caa5..0396bad 100644 --- a/src/components/Chat.vue +++ b/src/components/Chat.vue @@ -1740,10 +1740,17 @@ export default { showContextMenuForEvent(e) { const event = e.event; - this.selectedEvent = event; - this.updateRecentEmojis(); - this.showContextMenu = !this.showContextMenu; - this.showContextMenuAnchor = e.anchor; + if (this.selectedEvent == event) { + this.showContextMenu = !this.showContextMenu; + } else { + this.showContextMenu = false; + this.$nextTick(() => { + this.selectedEvent = event; + this.updateRecentEmojis(); + this.showContextMenu = true; + this.showContextMenuAnchor = e.anchor; + }) + } }, showAvatarMenuForEvent(e) { @@ -1761,6 +1768,7 @@ export default { if (this.showContextMenu) { this.showContextMenu = false; this.showContextMenuAnchor = null; + this.selectedEvent = null; e.preventDefault(); } },