nytimes / react-prosemirror

A library for safely integrating ProseMirror and React.
Other
459 stars 17 forks source link

backspace does not work on first keystroke for new single character text block #128

Open plaisted opened 4 months ago

plaisted commented 4 months ago

This is using the latest react-editor-view branch. Sounds sort of similar some of the issues in #42

When a new paragraph or heading is added with a single character, backspace does not work. To remove the character backspace must be hit twice. Note this does not seem to be isolated to backspace, as shift left also fails to highlight the character.

https://github.com/nytimes/react-prosemirror/assets/20848495/6c321086-ca14-48d7-b91b-aab084fdcf3e

smoores-dev commented 4 months ago

Thanks for the report @plaisted! Can you confirm which version you're using? We recently changed the deletion behavior in the react-editor-view branch; I'm trying to figure out whether we broke this recently or may have just fixed it

plaisted commented 4 months ago

Hi @smoores-dev , I'm using 0.7.0-next.5 which is the latest published version.

smoores-dev commented 4 months ago

@plaisted would you be able to either share your schema and node views, or create a minimal reproduction in codepen or some such? I'm actually unable to reproduce locally!

plaisted commented 4 months ago

I saved a branch with the issue but will take some with to extract everything into something shareable.

smoores-dev commented 4 months ago

Thanks, I appreciate it!

smoores-dev commented 2 months ago

Howdy! I’ve had a chance to look into this a bit more, and here’s what I’ve learned:

Just wanted to make sure it was clear that this isn't blocking and won't be a problem for users in production!