mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-24 13:53:23 +03:00
restores selection to last cursor position after preview end
This commit is contained in:
parent
8e91ee23d4
commit
c408d88e03
@ -108,9 +108,8 @@ const MarkdownEditorView = ({
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let bodyLength = bodyText.length;
|
|
||||||
if (!isPreviewActive) {
|
if (!isPreviewActive) {
|
||||||
_setTextAndSelection({ selection: { start: bodyLength, end: bodyLength }, text: bodyText });
|
_setTextAndSelection({ selection: bodySelection, text: bodyText });
|
||||||
}
|
}
|
||||||
}, [isPreviewActive]);
|
}, [isPreviewActive]);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user