mirror of
https://github.com/NovaOSS/nova-betterchat.git
synced 2024-11-25 21:34:00 +01:00
feat: add shortcut for "save and submit" when editing message (#127)
save and submit the edited message when ctrl and shift key been pressed simultaneously. Co-authored-by: Jing Hua <59118459+ztjhz@users.noreply.github.com>
This commit is contained in:
parent
78bf777365
commit
63596c20d4
|
@ -353,8 +353,12 @@ const EditView = ({
|
||||||
handleSaveAndSubmit();
|
handleSaveAndSubmit();
|
||||||
resetTextAreaHeight();
|
resetTextAreaHeight();
|
||||||
}
|
}
|
||||||
} else if (e.ctrlKey || e.shiftKey) {
|
} else {
|
||||||
handleSave();
|
if (e.ctrlKey && e.shiftKey) {
|
||||||
|
e.preventDefault();
|
||||||
|
handleSaveAndSubmit();
|
||||||
|
resetTextAreaHeight();
|
||||||
|
} else if (e.ctrlKey || e.shiftKey) handleSave();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue