| ... | ... | @@ -123,6 +123,19 @@ export function PullRequestCommentComposer({ |
| 123 | 123 | placeholder="Leave a comment" |
| 124 | 124 | aria-label="Comment on this pull request" |
| 125 | 125 | onChange={(event) => setBody(event.target.value)} |
| 126 | onKeyDown={(event) => { |
| 127 | if (event.nativeEvent.isComposing || event.keyCode === 229) return; |
| 128 | if ( |
| 129 | event.key === "Enter" && |
| 130 | (event.metaKey || event.ctrlKey) && |
| 131 | !event.shiftKey && |
| 132 | !event.altKey |
| 133 | ) { |
| 134 | event.preventDefault(); |
| 135 | event.stopPropagation(); |
| 136 | if (!event.repeat) void submit("comment"); |
| 137 | } |
| 138 | }} |
| 126 | 139 | /> |
| 127 | 140 | <div className="flex flex-wrap justify-end gap-2"> |
| 128 | 141 | {followUpAction === null ? null : ( |