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:
Cursor Agent committed 2026-02-17 17:49:48 +00:00
1 parent f634a12b89
commit fb0081983b
1 file changed
+1 -1
+1 -1
View File
@@ -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();