Commit fe682d8
committed
fix: Shift+Enter now inserts newline when Ctrl+Enter to send is enabled
Fixes #10386
When enterBehavior is set to "newline" (Ctrl+Enter to send mode),
Shift+Enter was incorrectly triggering onSend() due to event.shiftKey
being included in the send condition.
This commit removes event.shiftKey from the condition so that:
- Enter: inserts a new line
- Shift+Enter: inserts a new line (consistent with standard text editing)
- Ctrl/Cmd+Enter: sends the message
Updated the test to reflect the corrected behavior.1 parent ea62173 commit fe682d8
File tree
2 files changed
+20
-5
lines changed- webview-ui/src/components/chat
- __tests__
2 files changed
+20
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
495 | 495 | | |
496 | 496 | | |
497 | 497 | | |
498 | | - | |
499 | | - | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
500 | 501 | | |
501 | 502 | | |
502 | 503 | | |
503 | 504 | | |
504 | | - | |
| 505 | + | |
505 | 506 | | |
506 | 507 | | |
507 | 508 | | |
| |||
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1081 | 1081 | | |
1082 | 1082 | | |
1083 | 1083 | | |
1084 | | - | |
| 1084 | + | |
1085 | 1085 | | |
1086 | 1086 | | |
1087 | 1087 | | |
| |||
1096 | 1096 | | |
1097 | 1097 | | |
1098 | 1098 | | |
| 1099 | + | |
1099 | 1100 | | |
1100 | 1101 | | |
1101 | 1102 | | |
1102 | 1103 | | |
1103 | 1104 | | |
| 1105 | + | |
1104 | 1106 | | |
1105 | 1107 | | |
1106 | 1108 | | |
| |||
1111 | 1113 | | |
1112 | 1114 | | |
1113 | 1115 | | |
| 1116 | + | |
1114 | 1117 | | |
1115 | 1118 | | |
1116 | 1119 | | |
1117 | 1120 | | |
1118 | 1121 | | |
1119 | 1122 | | |
1120 | 1123 | | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
1121 | 1135 | | |
1122 | | - | |
| 1136 | + | |
1123 | 1137 | | |
1124 | 1138 | | |
1125 | 1139 | | |
| |||
0 commit comments