NOW MANAGED ON CODEBERG
Lexical: Altered keyboard handling to indicant handled state
Dan Brown6872eb802c3c
diff --git a/resources/js/wysiwyg/services/keyboard-handling.ts b/resources/js/wysiwyg/services/keyboard-handling.tsindex 791fb0bed..2c7bfdbba 100644--- a/resources/js/wysiwyg/services/keyboard-handling.ts+++ b/resources/js/wysiwyg/services/keyboard-handling.ts@@ -58,15 +58,19 @@ function insertAfterSingleSelectedNode(editor: LexicalEditor, event: KeyboardEvereturn false;}-function handleInsetOnTab(editor: LexicalEditor, event: KeyboardEvent|null) {+function handleInsetOnTab(editor: LexicalEditor, event: KeyboardEvent|null): boolean {const change = event?.shiftKey ? -40 : 40;- editor.update(() => {- const selection = $getSelection();- const nodes = selection?.getNodes() || [];- if (nodes.length > 1 || (nodes.length === 1 && $isCustomListItemNode(nodes[0].getParent()))) {+ const selection = $getSelection();+ const nodes = selection?.getNodes() || [];+ if (nodes.length > 1 || (nodes.length === 1 && $isCustomListItemNode(nodes[0].getParent()))) {+ editor.update(() => {$setInsetForSelection(editor, change);- }- });+ });+ event?.preventDefault();+ return true;+ }++ return false;}export function registerKeyboardHandling(context: EditorUiContext): () => void {