Point to gutenberg hash with list block spaces crash fix #885
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #871
Gutenberg side PR: WordPress/gutenberg#15021
This PR brings in the fix, which is only on source code on the Gutenberg repo.
The internal representation of rich-text in Aztec and the format-lib are not fully compatible or in-sync and we also use html to establish the communication between the two. That can lead to cases like the issue linked, where Aztec will do some trimming to remove spaces that are unimportant for html rendering, but format-lib won't so, making the caret positioning logic to get out of sync.
This fix will try to detect when such spaces will be removed and avoid telling Aztec where to put the caret and hope for the best 🤞.
This fix is not "perfect" though. It only touches the Android side (iOS seems to handle the caret setting OK) and will also lead to the text entered by the user being mutated since the spaces will get trimmed by Aztec.
To test A
To test B
To test C