Fix: Shift+Enter inserts newline even when composer suggestions are open
The onKeyDown handler intercepted Enter unconditionally when the composer completion menu was active, preventing Shift+Enter from inserting a newline. Add !e.shiftKey check so Shift+Enter bypasses suggestion selection and falls through to the default newline behavior.
This commit is contained in:
1 parent
f634a12b89
commit
fb0081983b
1 file changed
+1
-1
@@ -1129,7 +1129,7 @@ export default function ChatView() {
|
||||
setComposerMenuIndex((existing) => Math.max(existing - 1, 0));
|
||||
return;
|
||||
}
|
||||
if (e.key === "Tab" || e.key === "Enter") {
|
||||
if (e.key === "Tab" || (e.key === "Enter" && !e.shiftKey)) {
|
||||
const selectedItem = activeComposerMenuItem ?? composerMenuItems[0];
|
||||
if (selectedItem) {
|
||||
e.preventDefault();
|
||||
|
||||
Reference in new issue
Block a user