-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
(Firefox) Misplaced caret when selecting a RichText element #11812
Comments
I can repro this in Ubuntu Linux, Firefox 63. It looks like this happens only the first time a block is selected. If I repeat the steps outlined by @mcsf the caret ends up in the proper position the second and subsequent times. |
In my testing, step 2 above (making sure no block is selected) isn't necessary, I can always repro this bug the first time a block is selected. |
This is what I know so far. When this bug is reproduced:
The offset values for selection/range are properly set when the behavior is correct. Checked MDN and canisue for compatibility issues but didn't find any. |
No, it hasn't solved this. |
I'm struggling to find a minimal reproducible case to report to bugzilla. Searching in the database I've found this one: getSelection() returns wrong anchorNode/anchorOffset when selection contains nested different contenteditable context. It points to this jsfiddle to play with the testcase. Sharing in case it sparks any thoughts. |
I can look into this issue, but it seems slightly less pressing atm? |
I'm sure other issues are more pressing, but this one is nevertheless a pretty bad experience. |
Since this is a browser issue and we need to really focus on our priorities, punting to Follow-Ups. |
Just for the record, I can still repro this, but I've also noticed that the caret only gets misplaced (at the beginning of the element) if that RichText element has never been focused before. Once a RichText element |
Describe the bug
Caret is erroneously positioned at the start of a RichText element when selecting a block in Firefox.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Caret should be placed where I clicked.
Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: