-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[RNmobile] Fix problems with undo/redo on Android #12417
Conversation
…rnmobile/danilo-try-to-fix-undo-redo * 'master' of https://github.com/WordPress/gutenberg: Avoid changing default wpautop priority (#11722) Try fixing the tab navigation issue (#12390) Polish editor style documentation (#12381)
There was a problem hiding this 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.
I've seen the e2e tests are failing due to reasons unrelated to this PR.
LGTM feel free to merge as soon as those get fixed
I noticed while debugging and setting a breakpoint in I couldn't think of a solution for it, so leaving the comment here for now. |
That's right @mzorz, but the I agree with you that a better solution is required, but for the alpha I think it's ok, and well tested since returning true very often :) Just need to verify performance problems, since the whole |
I did another test this morning to confirm that the native side is only hit ( If you want to test this put a breakpoint on the native side |
…rnmobile/danilo-try-to-fix-undo-redo * 'master' of https://github.com/WordPress/gutenberg: Autocompleters: Consider block category (#12287) Only init TinyMCE once per instance (#12386) RichText: convert HTML formatting whitespace to spaces (#12166) Notices: Remove "files" block in package.json (#12438) Edit Post: Avoid rendering AdminNotices compatibility component (#12444) Correct the docs manifest (#12411)
…ing when not needed
…HEAD * 'master' of https://github.com/WordPress/gutenberg: [RNmobile] Fix problems with undo/redo on Android (#12417) Add registry param to withDispatch component (#11851) Autocompleters: Consider block category (#12287) Only init TinyMCE once per instance (#12386) RichText: convert HTML formatting whitespace to spaces (#12166) Notices: Remove "files" block in package.json (#12438) Edit Post: Avoid rendering AdminNotices compatibility component (#12444) Correct the docs manifest (#12411)
This PR fixes a problem where the undo/redo feature was not working on Android if small changes were made to the content.
Actually undo/redo feature was not working fine even if there were lot of changes to the content, but in this case the problem was less noticeable, since the undo/redo feature replaced the content with the wrong text.
The problem was that RichText props were not correctly updated on typing. Then on
undo
the RichText component already had the same "old" value stored in it, and the Native side was not refreshed at all (ThesetText
method of the AztecWrapper was not invoked).To test this PR follow the steps in the gb-mobile PR here:wordpress-mobile/gutenberg-mobile#297