X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/45bebc5c454ced236db27631004cc2628260f3c9..ac50cae92710f684c801ad933b924de2bec2b460:/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);