X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/021d30c6418d5b38ed0b8baef80afbaed35ec612..b77bfa044453a746889284a4fd9a433a96b17619:/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);