X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/45bebc5c454ced236db27631004cc2628260f3c9..314bc2164ef9e9b94bd57eba48211e5df6002bf1:/src/editor/modules/documentCanvas/canvas/selection.js?ds=sidebyside diff --git a/src/editor/modules/documentCanvas/canvas/selection.js b/src/editor/modules/documentCanvas/canvas/selection.js index 4de392b..e072050 100644 --- a/src/editor/modules/documentCanvas/canvas/selection.js +++ b/src/editor/modules/documentCanvas/canvas/selection.js @@ -129,7 +129,7 @@ return { params = { type: 'caret', element: element, - offset: element.isEmpty() ? 0 : nativeSelection.focusOffset + offset: element.isEmpty() ? 0 : nativeSelection.getRangeAt(0).startOffset }; } else if(isText(nativeSelection.focusNode) && isText(nativeSelection.anchorNode)) { anchorElement = canvas.getDocumentElement(nativeSelection.anchorNode);