From 9348eac5b58314fffc1649cbda05f97c13ac8fe5 Mon Sep 17 00:00:00 2001 From: G30 <50341825+silentoplayz@users.noreply.github.com> Date: Fri, 13 Nov 2026 03:37:46 -0500 Subject: [PATCH] fix: a half-typed mention in a hidden channel no longer takes Enter from other tabs (#34361) --- src/lib/components/channel/MessageInput/MentionList.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/components/channel/MessageInput/MentionList.svelte b/src/lib/components/channel/MessageInput/MentionList.svelte index 3723c3f3b0..b5fa733eff 100644 --- a/src/lib/components/channel/MessageInput/MentionList.svelte +++ b/src/lib/components/channel/MessageInput/MentionList.svelte @@ -151,9 +151,10 @@ }) .catch(() => {}); } + const input = document.activeElement; const keydownListener = (e: KeyboardEvent) => { // required to prevent the default enter behavior - if (e.key === 'Enter') { + if (e.key === 'Enter' && e.target === input) { e.preventDefault(); select(selectedIndex); }