Point to gutenberg hash with list block spaces crash fix#885
Merged
Conversation
Merged
5 tasks
Contributor
|
I tested cases A, B, and C on Android emulator, and observed the results described. I noticed, though, that the period-creation after two spaces (described in test case C) did not always seem to happen. For example, if I:
I do not observe the creation of the period. But if I:
I do observe the period being created. In any case, the text in the list item is trimmed. I suspect that the creation of the period may have something to do with the keyboard (AOSP built in emulator keyboard, in this case), and may be unrelated to this PR. |
6 tasks
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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