Fix Ctrl+Enter to commit text (#675)
This commit is contained in:
parent
3a30cdbb70
commit
faecef40af
|
|
@ -79,7 +79,7 @@ export function createInputManager(editor: Editor, container: HTMLElement, dialo
|
||||||
if (e.ctrlKey && e.shiftKey && key === "j") return false;
|
if (e.ctrlKey && e.shiftKey && key === "j") return false;
|
||||||
|
|
||||||
// Don't redirect tab or enter if not in canvas (to allow navigating elements)
|
// Don't redirect tab or enter if not in canvas (to allow navigating elements)
|
||||||
if (!canvasFocused && ["tab", "enter", " ", "arrowdown", "arrowup", "arrowleft", "arrowright"].includes(key.toLowerCase())) return false;
|
if (!canvasFocused && !targetIsTextField(e.target) && ["tab", "enter", " ", "arrowdown", "arrowup", "arrowleft", "arrowright"].includes(key.toLowerCase())) return false;
|
||||||
|
|
||||||
// Redirect to the backend
|
// Redirect to the backend
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue