From f45c6b4a755905485431872f4a4188de3ed05974 Mon Sep 17 00:00:00 2001 From: oliver <97427849+flamboh@users.noreply.github.com> Date: Wed, 16 Sep 2026 08:56:17 -0700 Subject: [PATCH] fix(web): submit PR comments with Cmd/Ctrl+Enter (#11994) --- .../pullRequest/PullRequestCommentComposer.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/apps/web/src/components/pullRequest/PullRequestCommentComposer.tsx b/apps/web/src/components/pullRequest/PullRequestCommentComposer.tsx index 7d749f0f3fea847ac4c3a1b9c5adc492fd8c48b8..9eef7cdb2e2f3a69b2e2d7f71b63ab2c1318d275 100644 --- a/apps/web/src/components/pullRequest/PullRequestCommentComposer.tsx +++ b/apps/web/src/components/pullRequest/PullRequestCommentComposer.tsx @@ -123,6 +123,19 @@ export function PullRequestCommentComposer({ placeholder="Leave a comment" aria-label="Comment on this pull request" onChange={(event) => setBody(event.target.value)} + onKeyDown={(event) => { + if (event.nativeEvent.isComposing || event.keyCode === 229) return; + if ( + event.key === "Enter" && + (event.metaKey || event.ctrlKey) && + !event.shiftKey && + !event.altKey + ) { + event.preventDefault(); + event.stopPropagation(); + if (!event.repeat) void submit("comment"); + } + }} />
{followUpAction === null ? null : ( -- 2.54.0