mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
Fix Ctrl+Enter to commit text (#675)
This commit is contained in:
committed by
Keavon Chambers
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;
|
||||
|
||||
// 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
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user