X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/3030a9e528fb71f1195b49f5b1db9e715647428b..18d3b922d43d185d122e1ac9d86e827c67f9e126:/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 99201bc..924a880 100644 --- a/src/editor/modules/documentCanvas/canvas/keyboard.js +++ b/src/editor/modules/documentCanvas/canvas/keyboard.js @@ -342,6 +342,10 @@ var keyEventHandlers = [ }, { success: function() { if(goto) { + if(!doc.containsNode(goto.wlxmlNode)) { + goto = s.startElement; + caretTo = s.startOffset; + } s.canvas.setCurrentElement(goto, {caretTo: caretTo}); } }