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

Backspace forces cursor to end of text (Firefox) #115

Open
nalgeon opened this issue Apr 21, 2024 · 1 comment
Open

Backspace forces cursor to end of text (Firefox) #115

nalgeon opened this issue Apr 21, 2024 · 1 comment
Labels
firefox A bug in FireFox itself

Comments

@nalgeon
Copy link

nalgeon commented Apr 21, 2024

Repro steps

Using Firefox 124/125, visit https://medv.io/codejar/, focus in the editor and delete all the code.

Enter the following code:

const greet = (name) => {
    console.log(5);
}

greet("World");

Place the cursor after the 5 and hit the Backspace key on your keyboard.

Expected

Deletes 5 and cursor remains between parentheses.

Actual

Deletes 5 and cursor jumps to the end of the file.

Environment

Firefox 124/125, Windows/macOS.

Does not reproduce in Chrome or Safari.

@GDur
Copy link

GDur commented Jun 13, 2024

I don't yet have the solution but I might have a good starting point:
In the save function, Firefox seems to "think" anchorNode, focusNode and editor are the same. In Chrome it works correctly and identifies them as different.
image

The log In Chrome:
image

The log in Firefox:
image

zamfofex added a commit to zamfofex/codejar that referenced this issue Sep 6, 2024
zamfofex added a commit to zamfofex/codejar that referenced this issue Dec 14, 2024
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