fix: a half-typed mention in a hidden channel no longer takes Enter from other tabs (#34361)

This commit is contained in:
G30 authored and GitHub committed 2026-11-13 17:37:46 +09:00
1 parent 4720ff19e7
commit 9348eac5b5
1 file changed
+2 -1
@@ -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);
}