caretTo = 'start';
}
var el = canvas.getDocumentElement(utils.nearestInDocumentOrder('[document-text-element]', direction, element.dom()[0]));
- canvas.setCurrentElement(el, {caretTo: caretTo});
+ if(el) {
+ canvas.setCurrentElement(el, {caretTo: caretTo});
+ }
}
},
keyup: function(event, canvas) {
element.data('wlxmlNode').detach();
}
canvas.setCurrentElement(goto, {caretTo: caretTo});
- canvas.publisher('contentChanged');
}
else if(cursorAtOperationEdge) {
if(direction === 'below') {