fix - ctrl+s from editor

This commit is contained in:
Jan Prochazka
2020-03-29 23:08:51 +02:00
parent 7d72b06940
commit 2d2199cb64

View File

@@ -66,6 +66,16 @@ export default function InplaceEditor({
editor.blur();
dispatchInsplaceEditor({ type: 'close', mode: 'enter' });
break;
case keycodes.s:
if (event.ctrlKey) {
if (isChangedRef.current) {
setChangeSet(setChangeSetValue(changeSet, definition, editor.value));
isChangedRef.current = false;
}
event.preventDefault();
dispatchInsplaceEditor({ type: 'close', mode: 'save' });
}
break;
}
}
return (