Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RichText: incorrect caret position after deleting selected word #11964

Closed
ellatrix opened this issue Nov 16, 2018 · 1 comment · Fixed by #11965
Closed

RichText: incorrect caret position after deleting selected word #11964

ellatrix opened this issue Nov 16, 2018 · 1 comment · Fixed by #11965
Assignees
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable
Milestone

Comments

@ellatrix
Copy link
Member

ellatrix commented Nov 16, 2018

Describe the bug

Splitting this out from #11564.

From @dd32:

If I select a word (either by highlight, or double click) and then backspace it (But NOT when placing the cursor after the word and backspacing it), the DOM would read word1 word2 (two spaces) but the UI would show the cursor directly before word2 such like this: word1 |word2, typing would then eat that second space and result with word1 word4word3 instead of the expected word1 word4 word3.

Testing in Firefox 63.0.3 caused the same carrot positioning, but the space would re-appear once the word started being typed.

@ellatrix ellatrix self-assigned this Nov 16, 2018
@ellatrix ellatrix added the [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable label Nov 16, 2018
@ellatrix ellatrix added this to the 4.5 milestone Nov 16, 2018
@swissspidy
Copy link
Member

I'm glad this is being tracked. Every time I delete some text or undo some changes, the caret position is messed up and ends up being at the end or beginning of the text. Very frustrating.

So thanks for working on fixing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants