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

[Gutenberg] Account for the end of buffer marker #928

Merged
merged 3 commits into from
Sep 17, 2020

Conversation

chipsnyder
Copy link
Contributor

@chipsnyder chipsnyder commented Sep 16, 2020

Fix

wordpress-mobile/gutenberg-mobile#1663
wordpress-mobile/gutenberg-mobile#1524

When deleting text in the Heading block the end of buffer marker prevents the handleBackspaceAndEnter event from firing resulting in weird behavior like the placeholder not showing up. This also affects formatting updates.

To resolve this I now account for that character in emptyEditTextBackspaceDetector check these changes will allow the

Heading block

  1. Open the Gutenberg Editor
  2. Create a Heading block containing some text
  3. Press backspace until all of the text has been deleted
    Expect to see the placeholder text return after the last character is deleted
Before
After

Paragraph block

  1. Open the Gutenberg Editor
  2. Create a Paragraph block containing some text
  3. Select the full text and apply some styling like bold
  4. Press backspace until all of the text has been deleted
    Expect to see the placeholder text return after the last character is deleted
Before
After

Review

@khaykov I think you were the last one to work in this area if you have time to review if not just let me know and I can ask someone working on Gutenberg to review.

Make sure strings will be translated:

  • If there are new strings that have to be translated, I have added them to the client's strings.xml as a part of the integration PR.

@chipsnyder chipsnyder added bug Gutenberg This issue is also valid importing Aztec in Gutenberg labels Sep 16, 2020
@chipsnyder chipsnyder requested a review from khaykov September 16, 2020 19:43
@chipsnyder chipsnyder marked this pull request as ready for review September 16, 2020 19:45
@khaykov khaykov self-assigned this Sep 17, 2020
Copy link
Member

@khaykov khaykov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirmed the issue and that the fix works! Thanks for the fix 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Gutenberg This issue is also valid importing Aztec in Gutenberg
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants