From c8a3e10e13e05aa14ee2dcf9b00064b7d65660a3 Mon Sep 17 00:00:00 2001 From: G30 <50341825+silentoplayz@users.noreply.github.com> Date: Sun, 27 Sep 2026 22:15:56 -0400 Subject: [PATCH] fix: let Enter through when the message box's suggestion list has nothing to show (#31506) --- .../chat/MessageInput/CommandSuggestionList.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/components/chat/MessageInput/CommandSuggestionList.svelte b/src/lib/components/chat/MessageInput/CommandSuggestionList.svelte index 8988ab9e29..e1e0ff016f 100644 --- a/src/lib/components/chat/MessageInput/CommandSuggestionList.svelte +++ b/src/lib/components/chat/MessageInput/CommandSuggestionList.svelte @@ -55,6 +55,7 @@ const onKeyDown = (event: KeyboardEvent) => { if (!['ArrowUp', 'ArrowDown', 'Enter', 'Tab', 'Escape'].includes(event.key)) return false; + if ((filteredItems ?? []).length === 0) return false; if (event.key === 'ArrowUp') { suggestionElement?.selectUp(); @@ -89,7 +90,10 @@ } -
0 ? '' : 'hidden'} id="suggestions-container"> +
0 ? '' : 'hidden'} + id={(filteredItems ?? []).length > 0 ? 'suggestions-container' : undefined} +>
{#if char === '/'}