mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-14 08:19:05 +00:00
[Glitch] Fix Cmd/Ctrl + Enter in the composer triggering confirmation dialog action
Port 1d081250f4 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user