fix: allow Ctrl/Cmd+Enter to submit messages when suggestion popup is open

The suggestion list components were intercepting all Enter key presses,
including Ctrl+Enter and Cmd+Enter, preventing message submission when
the autocomplete popup was visible. Now these modifier combinations
pass through to the editor's submit handler.
This commit is contained in:
Claude
2026-01-12 10:37:05 +00:00
parent 2bad592a3a
commit 051a84a962
2 changed files with 2 additions and 2 deletions

View File

@@ -58,7 +58,7 @@ export const EmojiSuggestionList = forwardRef<
return true;
}
if (event.key === "Enter") {
if (event.key === "Enter" && !event.ctrlKey && !event.metaKey) {
if (items[selectedIndex]) {
command(items[selectedIndex]);
}

View File

@@ -38,7 +38,7 @@ export const ProfileSuggestionList = forwardRef<
return true;
}
if (event.key === "Enter") {
if (event.key === "Enter" && !event.ctrlKey && !event.metaKey) {
if (items[selectedIndex]) {
command(items[selectedIndex]);
}