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

Cursor jumps to end of editor when deleting certain text nodes in Firefox #111

Open
dosisod opened this issue Dec 15, 2023 · 1 comment
Open
Labels
firefox A bug in FireFox itself

Comments

@dosisod
Copy link

dosisod commented Dec 15, 2023

Steps to reproduce

  • Open Firefox (currently using version 120.0.1)
  • Go to https://medv.io/codejar/
  • In the code example, move cursor to position indicated by and hit backspace:
import {CodeJar} from │'codejar';
                      ^

The space character gets deleted, but the cursor also jumps to the end of the div/editor. This isn't happening in Brave/Chromium, so I suspect it is a Firefox specific issue.

From what I can tell this happens when a whitespace text node gets deleted, but only if it's between 2 non-text elements. This isn't an issue when deleting non-text elements like <span>, or deleting whitespace characters in the middle of multiple whitespace characters in a text node.

@antonmedv antonmedv added the firefox A bug in FireFox itself label Dec 16, 2023
@eric-hemasystems
Copy link

I'm also getting this issue (in Firefox as well). I updated the editor not too long ago. Prior to that it didn't do that so it was a problem introduced (which means maybe a git bisect could find the culprit).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
firefox A bug in FireFox itself
Projects
None yet
Development

No branches or pull requests

3 participants