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

Case where backspace will not merge Paragraph Blocks #1865

Closed
cameronvoell opened this issue Feb 7, 2020 · 3 comments
Closed

Case where backspace will not merge Paragraph Blocks #1865

cameronvoell opened this issue Feb 7, 2020 · 3 comments

Comments

@cameronvoell
Copy link
Contributor

Describe the bug

If you delete at least one character from the start of a paragraph block, then continuing to hit backspace will not merge the block with the previous block like it is supposed to.

To Reproduce
Steps to reproduce the behavior:

  1. Add a pararaph block to an article and add some text to it
  2. Click in the middle of the text and hit enter to move the right half of the text to a new block
  3. Hit backspace and watch the new block merge back correctly with the previous block
  4. Hit enter from the middle of the text again to create a new block
  5. This time delete one or more characters from the beginning of the new text block
  6. Continue to hit the backspace key => note that the block is no longer merging with the previous block like it was in step 3.

Expected behavior
Pressing Backspace from the beginning of a paragraph block should always merge it with an existing preceding paragraph block, regardless if you deleted characters at the beginning first.

Screenshots

merge-on-delete-broken

Smartphone (please complete the following information):

  • Device: Galaxy Tab S3
  • OS: Android 10 (API 29)
  • Version Gutenberg-Mobile release/1.22.0
@cameronvoell
Copy link
Contributor Author

cameronvoell commented Feb 7, 2020

I verified this bug was present as far back as the WPAndroid release 13.6, but not in WPAndroid 13.5.

WPAndroid 13.6 included gutenberg-mobile release 1.16

@cameronvoell
Copy link
Contributor Author

cameronvoell commented Feb 7, 2020

I am guessing the issue was introduced by this change, or an Aztec update that went into WPAndroid 13.6, or some combination of the two.

Relevant methods for troubleshooting the issue include RichText native component handleDelete and handleSelectionChangeFromAztec

I see handleSelectionChangeFromAztec not getting called as it likely should when we hit backspace in the testing steps above, which means this might be properly fixed from the Aztec end.

@cameronvoell
Copy link
Contributor Author

Fixed by #1867

Remaining related case documented here: #1873

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

No branches or pull requests

1 participant