X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/97b4fb7216407c6623f0e1307bae4b98b0c64b75..179b145075f8f90038cba27e30a4fcadd3a764ff:/modules/documentCanvas/canvas/canvas.js diff --git a/modules/documentCanvas/canvas/canvas.js b/modules/documentCanvas/canvas/canvas.js index 9b57d93..318a22f 100644 --- a/modules/documentCanvas/canvas/canvas.js +++ b/modules/documentCanvas/canvas/canvas.js @@ -146,7 +146,13 @@ $.extend(Canvas.prototype, { var cursor = canvas.getCursor(); if(!cursor.isSelecting()) { var position = cursor.getPosition(), - elements = position.element.split({offset: position.offset}), + element = position.element; + + if(!(element.parent().parent())) { + return false; // top level element is unsplittable + } + + var elements = position.element.split({offset: position.offset}), newEmpty, goto;