[Glitch] Fix Cmd/Ctrl + Enter in the composer triggering confirmation dialog action

Port 6e294828d65eeddb8145291083db1a5ee41d9d57 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
diondiondion 2025-11-14 10:39:42 +01:00 committed by Claire
parent e0d7230f97
commit 951816c5d6

View File

@ -110,10 +110,12 @@ class ComposeForm extends ImmutablePureComponent {
handleKeyDownPost = (e) => {
if (e.key.toLowerCase() === 'enter' && (e.ctrlKey || e.metaKey)) {
this.handleSubmit(e);
e.preventDefault();
}
if (e.key.toLowerCase() === 'enter' && e.altKey) {
this.handleSecondarySubmit(e);
e.preventDefault();
}
this.blurOnEscape(e);