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

Fix undo/redo not working on small changes on RichText #297

Merged
merged 3 commits into from
Nov 30, 2018

Conversation

daniloercoli
Copy link
Contributor

@daniloercoli daniloercoli commented Nov 29, 2018

This PR fixes a problem where the undo/redo feature was not working if small changes were made to the content. Tapping undo does not update the text in the RichText powered block.

Actually the undo/redo feature was not working fine even if there were lot of changes to the RichText content, but in this case the problem was less noticeable, since the undo/redo feature replaced the content with the wrong text.

GB side PR: WordPress/gutenberg#12417

To test this PR:

  • Start the demo app

  • Make a small change to a Para or Heading block

  • Tap undo

  • It should revert the content

  • Start writing and deleting into RichText powered block, and have fun with the undo/redo feature. It should work.

  • Please test also writing fast on Android.

Copy link
Contributor

@mzorz mzorz left a comment

Choose a reason for hiding this comment

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

Tested, explanation and code make sense, and was able to confirm it fixes the behavior it intends to fix.
There are a few cases I found that don't work exactly as expected but this PR is correct in that it fixes the described behavior.
LGTM :shipit: remember to update Gutenberg's hash once the other PR gets merged before merging this one 👍

…g-mobile into fix/undo-redo-not-working-with-small-changes

* 'master' of https://github.com/wordpress-mobile/gutenberg-mobile:
  Create blocks empty by default
  Update references
  Set keyboardShouldPersistTaps to always
  Updated RNAztec reference
@daniloercoli daniloercoli merged commit 7c171b2 into master Nov 30, 2018
@daniloercoli daniloercoli deleted the fix/undo-redo-not-working-with-small-changes branch November 30, 2018 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants