authorgravatar for 97427849+flamboh@users.noreply.github.comoliver <97427849+flamboh@users.noreply.github.com> 2026-09-16 08:56:17-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-16 12:56:17-03:00
logf45c6b4a755905485431872f4a4188de3ed05974
treecb51eb444b654f7375d6e2ce6e95b9c77c6de603
parentccf220be205f0e509021dbc8cbda90daa638e20d
signature Signed by PGP key B5690EEEBB952194

fix(web): submit PR comments with Cmd/Ctrl+Enter (#11994)


1 files changed, 13 insertions(+), 0 deletions(-)

apps/web/src/components/pullRequest/PullRequestCommentComposer.tsx+13
......@@ -123,6 +123,19 @@ export function PullRequestCommentComposer({
123123 placeholder="Leave a comment"
124124 aria-label="Comment on this pull request"
125125 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 }}
126139 />
127140 <div className="flex flex-wrap justify-end gap-2">
128141 {followUpAction === null ? null : (