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 outside of block #253

Open
lordenas opened this issue Feb 17, 2022 · 3 comments
Open

cursor outside of block #253

lordenas opened this issue Feb 17, 2022 · 3 comments

Comments

@lordenas
Copy link

lordenas commented Feb 17, 2022

If the cursor is placed after the html block, then it flies out of the block.

I prepared an example, try using backspace to remove the word "move" before the "test" block and you will see how the cursor will be on the right outside the block.

https://codesandbox.io/s/strange-nobel-0yf02o?file=/src/index.js

How can this be fixed? I need "class="chip chip--error"" to be immutable

@tchen-l
Copy link

tchen-l commented Mar 2, 2022

I found the same problem

@xxcn-hj
Copy link

xxcn-hj commented Mar 2, 2022

I found the same problem,too

@jayporta
Copy link

jayporta commented Jul 1, 2022

This issues has been around for a really long time. It's a bug in contenteditable when backspacing to a non-contenteditable element. The method in the top rated answer works kind of but I'm having issues with the first non-contenteditable on a line not being deleted.

This is outside of the scope of this library. It's definitely a browser/HTML issue.

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

No branches or pull requests

4 participants