Merge branch 'dev' into sidebar-update
This commit is contained in:
commit
923d2a2167
1 changed files with 5 additions and 0 deletions
|
@ -290,6 +290,11 @@ function MessageEdit({ body, onSave, onCancel }) {
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const handleKeyDown = (e) => {
|
const handleKeyDown = (e) => {
|
||||||
|
if (e.key === 'Escape') {
|
||||||
|
e.preventDefault();
|
||||||
|
onCancel();
|
||||||
|
}
|
||||||
|
|
||||||
if (e.key === 'Enter' && e.shiftKey === false) {
|
if (e.key === 'Enter' && e.shiftKey === false) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
onSave(editInputRef.current.value);
|
onSave(editInputRef.current.value);
|
||||||
|
|
Loading…
Reference in a new issue