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); }