X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/b95e2e87d96a747f503990f6f315ade26fe88acc..d18c7b69cbc94bec9a75a4c1e0671e65597b5b24:/src/editor/modules/documentCanvas/canvas/keyboard.js diff --git a/src/editor/modules/documentCanvas/canvas/keyboard.js b/src/editor/modules/documentCanvas/canvas/keyboard.js index e7f5fe8..16f2f68 100644 --- a/src/editor/modules/documentCanvas/canvas/keyboard.js +++ b/src/editor/modules/documentCanvas/canvas/keyboard.js @@ -189,14 +189,14 @@ handlers.push({keys: [KEYS.BACKSPACE, KEYS.DELETE], goto; if(parent.children().length === 1 && parent.children()[0].sameNode(element)) { if(grandParent && grandParent.children().length === 1) { - goto = grandParent.append({text: ''}); + goto = grandParent.data('wlxmlNode').append({text: ''}); } else { goto = element.getNearestTextElement(direction); } - parent.detach(); + parent.data('wlxmlNode').detach(); } else { goto = element.getNearestTextElement(direction); - element.detach(); + element.data('wlxmlNode').detach(); } canvas.setCurrentElement(goto, {caretTo: caretTo}); canvas.publisher('contentChanged');