-
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
[Mobile] Fix caret position after inline paste - Update. #14957
Conversation
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.
Hey @mkevins, nice fix here :)
I tried both on iOS and Android and it's working like expected.
I have found some issue, which I think isn't related to this PR and maybe we already have raised it.
On iOS, when you paste the content e.g. Hello World
, Hello
will lose bold style after the paste, however on Android that isn't a case, so I can assume that Android is working as expected and iOS not ?
Note: @mkevins maybe it would be good to add Label: Component Mobile to this PR. |
Thank you @marecar3 . I've added [Component] Mobile label, and one for paste as well. |
I don't recall that one, but it could be. I don't yet have an iOS device to test on, but will soon. I wonder if it could be related to styles set on inline span tags. I remember a known issue about some loss of styles around that, so it could be related. |
Note
This is an addendum to #14893 as "concurrent" changes in #14820 made the previous patch inert.
Specifically, the flag
needsSelectionUpdate
was moved fromstate
tothis
so that it could be toggled false in therender
method without triggering an additional render. More details here: https://github.com/WordPress/gutenberg/pull/14820/files#r274915836 .Description
This PR fixes part of this issue: wordpress-mobile/gutenberg-mobile#828 , specifically, when inline content is pasted.
How has this been tested?
This has been tested using the steps here:
wordpress-mobile/gutenberg-mobile#828 (comment)
Screenshots
Types of changes
This is a bug fix, but currently only resolves a part of the original issue. It serves as an incremental improvement.
Checklist: