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

Content deleted when pressing delete then enter #39067

Closed
marcochiesi opened this issue Feb 24, 2022 · 1 comment
Closed

Content deleted when pressing delete then enter #39067

marcochiesi opened this issue Feb 24, 2022 · 1 comment
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... [Type] Bug An existing feature does not function as intended

Comments

@marcochiesi
Copy link

marcochiesi commented Feb 24, 2022

Description

After using the "Del" key to join two paragraph blocks, if you hit "Enter" or "Shift+Enter" the text after the cursor gets deleted unexpectedly.

It may be related to #34722

Step-by-step reproduction instructions

  1. Insert some text in a paragraph block
  2. Hit "Enter" to generate a new paragraph block
  3. Insert some text in the second paragraph block
  4. Move the cursor to the end of the text of the first paragraph block
  5. Hit the "Del" key so that the two blocks are joined
  6. Hit "Enter" or "Shift + Enter" and the content is deleted instead of going to a new line

Screenshots, screen recording, code snippet

gutenberg-bug

Environment info

  • WordPress 5.9.1, Gutenberg 12.6.1, Twenty Twenty-Two 1.1
  • Chrome and Firefox on Windows 10 desktop

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@Mamaduka
Copy link
Member

Mamaduka commented Feb 25, 2022

Thanks for contributing, @marcochiesi.

#38991 fixes this issue. I also added E2E tests to avoid regressions in the future #39007.

The fix will be part of Gutenberg 12.7, which should be released next week.

@Mamaduka Mamaduka added [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... [Type] Bug An existing feature does not function as intended labels Feb 25, 2022
@ellatrix ellatrix closed this as completed Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants