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

Weird backspace behavior in Firefox #13982

Closed
ZebulanStanphill opened this issue Feb 20, 2019 · 2 comments · Fixed by #13850
Closed

Weird backspace behavior in Firefox #13982

ZebulanStanphill opened this issue Feb 20, 2019 · 2 comments · Fixed by #13850
Labels
Browser Issues Issues or PRs that are related to browser specific problems Needs Testing Needs further testing to be confirmed. [Package] Rich text /packages/rich-text [Type] Bug An existing feature does not function as intended

Comments

@ZebulanStanphill
Copy link
Member

Issue description

Pressing Backspace on empty lines has some weird behavior in Firefox.
firefox-backspace-weirdness

Steps to reproduce

  1. Insert a Paragraph block.
  2. Type a single character.
  3. Press Backspace.
  4. Notice that the Paragraph now has 2 lines.
  5. Type two characters in the first line.
  6. Move focus to the second line.
  7. Press Backspace again.
  8. Notice that both the second line and the last character of the first line are removed.

This bug also occurs with other blocks that use RichText.

Testing environment

  • OS: Antergos Linux
  • Browser: Firefox Developer Edition 66.0b8
  • WordPress: 5.0.3
  • Gutenberg: 5.1 (the bug also occurred in 5.0... possibly earlier)
@designsimply designsimply added [Type] Bug An existing feature does not function as intended Browser Issues Issues or PRs that are related to browser specific problems [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... Needs Testing Needs further testing to be confirmed. labels Feb 20, 2019
@youknowriad
Copy link
Contributor

Could this be related and fixed by #13850 ?

@ellatrix
Copy link
Member

Yes, #13850 fixes this issue as well. Firefox inserts <br> elements for some actions. With that PR we keep track of line breaks inserted by us and discard the rest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Browser Issues Issues or PRs that are related to browser specific problems Needs Testing Needs further testing to be confirmed. [Package] Rich text /packages/rich-text [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants