X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/021d30c6418d5b38ed0b8baef80afbaed35ec612..ac50cae92710f684c801ad933b924de2bec2b460:/src/editor/modules/documentCanvas/canvas/selection.js 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);