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

[Mobile] Fix caret position after inline paste - Update. #14957

Merged
merged 1 commit into from
Apr 13, 2019

Conversation

mkevins
Copy link
Contributor

@mkevins mkevins commented Apr 12, 2019

Note

This is an addendum to #14893 as "concurrent" changes in #14820 made the previous patch inert.

Specifically, the flag needsSelectionUpdate was moved from state to this so that it could be toggled false in the render 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:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

@mkevins mkevins requested a review from marecar3 April 12, 2019 14:38
Copy link
Contributor

@marecar3 marecar3 left a 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 ?

ezgif com-video-to-gif (6)

@marecar3 marecar3 added Mobile Web Viewport sizes for mobile and tablet devices and removed Mobile Web Viewport sizes for mobile and tablet devices labels Apr 12, 2019
@marecar3
Copy link
Contributor

Note: @mkevins maybe it would be good to add Label: Component Mobile to this PR.

@mkevins mkevins added Mobile Web Viewport sizes for mobile and tablet devices [Feature] Paste labels Apr 13, 2019
@mkevins
Copy link
Contributor Author

mkevins commented Apr 13, 2019

Thank you @marecar3 . I've added [Component] Mobile label, and one for paste as well.

@mkevins mkevins merged commit 5fb26b6 into master Apr 13, 2019
@mkevins mkevins deleted the fix/caret-position-after-inline-paste2 branch April 13, 2019 02:27
@mkevins
Copy link
Contributor Author

mkevins commented Apr 13, 2019

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 ?

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.

mchowning pushed a commit to mchowning/gutenberg that referenced this pull request Apr 15, 2019
@youknowriad youknowriad added this to the 5.5 (Gutenberg) milestone Apr 15, 2019
@gziolo gziolo added Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) and removed Mobile Web Viewport sizes for mobile and tablet devices labels Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Paste Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants