[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:
parent
e0d7230f97
commit
951816c5d6
@ -110,10 +110,12 @@ class ComposeForm extends ImmutablePureComponent {
|
|||||||
handleKeyDownPost = (e) => {
|
handleKeyDownPost = (e) => {
|
||||||
if (e.key.toLowerCase() === 'enter' && (e.ctrlKey || e.metaKey)) {
|
if (e.key.toLowerCase() === 'enter' && (e.ctrlKey || e.metaKey)) {
|
||||||
this.handleSubmit(e);
|
this.handleSubmit(e);
|
||||||
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.key.toLowerCase() === 'enter' && e.altKey) {
|
if (e.key.toLowerCase() === 'enter' && e.altKey) {
|
||||||
this.handleSecondarySubmit(e);
|
this.handleSecondarySubmit(e);
|
||||||
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.blurOnEscape(e);
|
this.blurOnEscape(e);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user