X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/ef3798eb62c7d42315da10c02ce75ba0b9232dd0..9a9e6d2723f56145d45790667212a4019fd5776b:/modules/documentCanvas/canvas/canvas.js diff --git a/modules/documentCanvas/canvas/canvas.js b/modules/documentCanvas/canvas/canvas.js index a3d24a0..144417a 100644 --- a/modules/documentCanvas/canvas/canvas.js +++ b/modules/documentCanvas/canvas/canvas.js @@ -181,7 +181,7 @@ $.extend(Canvas.prototype, { params = _.extend({caretTo: 'end'}, params); var findFirstDirectTextChild = function(e, nodeToLand) { var byBrowser = this.getCursor().getPosition().element; - if(byBrowser.parent().sameNode(nodeToLand)) + if(byBrowser && byBrowser.parent().sameNode(nodeToLand)) return byBrowser; var children = e.children(); for(var i = 0; i < children.length; i++) {