Skip to content
This repository was archived by the owner on Dec 26, 2025. It is now read-only.

Restore selection in contentEditable - #45

Open
tje3d wants to merge 2 commits into
needim:masterfrom
tje3d:master
Open

Restore selection in contentEditable#45
tje3d wants to merge 2 commits into
needim:masterfrom
tje3d:master

Conversation

@tje3d

@tje3d tje3d commented May 6, 2018

Copy link
Copy Markdown

execCommand in replaceText wont trigger mouseup or keyup and that's why we lose caret

Closes #39

@nguyen-thanhviet-labellevie

Copy link
Copy Markdown

👍 I got stuck into this bug. Thank you !

@nguyen-thanhviet-labellevie

Copy link
Copy Markdown

ref tje3d#1

@nguyen-thanhviet-labellevie

Copy link
Copy Markdown

@tje3d It does not work in Safari.
In Safari, I guess when focus event is triggered, window.getSelection() take no range, window.r angeCount = 0, then it can not update range.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants