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

Updated react-native-recyclerview-list hash to include selection fix #265

Closed
wants to merge 1 commit into from

Conversation

mzorz
Copy link
Contributor

@mzorz mzorz commented Nov 21, 2018

Fixes #267 for PlainText blocks on Android.

[EDITED]
was: "fixes #135 for both RichText and PlainText blocks on Android", updated to reflect as per #265 (comment).

See wordpress-mobile/react-native-recyclerview-list#11 for more information.

To test:
Before:

  1. open the demo app
  2. try to select text on RichText and PlainText-backed blocks (Header, Paragraph are rich-text, while Code and Read More are based on PlainText)
  3. observe you can't select text (contextual menu doesn't appear, can't copy, etc.)

gutenberg_selection_works_not_ok

After:

  1. open the demo app
  2. try to select text on RichText and PlainText-backed blocks (Header, Paragraph are rich-text, while Code and Read More are based on PlainText)
  3. observe you can select, copy, paste and such.

gutenberg_offscreen_works_ok

@mzorz
Copy link
Contributor Author

mzorz commented Nov 21, 2018

Leaving a reminder here - when reviewing this PR, remember this does not fix #251 which is tracked separately 👍

@hypest
Copy link
Contributor

hypest commented Nov 21, 2018

Awesome development @mzorz , thanks for digging deep to fix this issue!

This seems to work OK for me on my Pixel 2 XL (Android 9) when used via Vysor, that is, when using the mouse from my laptop. But I still see this issue when using the phone with my hands. The RichText blocks seem to not acquire focus/caret even though the block itself does get selected (I can see the inline toolbar appearing on each). I wonder if you see similar behavior on any of your devices.

Also tried this on my Android v7.1.2 Nexus 5X and what I notice there is that the caret is acquired by the RichText block (altough a few times out of the total is not) but can't select text by long pressing.

In both phones, TextInput blocks seem to work fine, both in terms of receiving the caret and selecting text.

Edit: thought of giving my Android 8.0 Galaxy S7 a go as well and the behavior is identical to the Android 9 Pixel 2 XL above.

@daniloercoli
Copy link
Contributor

Tested on Android 8.0.0 - Samsung S9, and the behavior is identical to what reported above by @hypest.

@mzorz
Copy link
Contributor Author

mzorz commented Nov 21, 2018

Thanks for the reports here @daniloercoli and @hypest ! I actually did not test on the real device 😬 - will get back to you after checking myself and trying some few bullets I may have 🙇

@mzorz
Copy link
Contributor Author

mzorz commented Nov 21, 2018

Just a note here that tested the RecyclerListView demo project PR on a Pixel 2 and it seems to be working alright for me. Will continue looking on the Gutenberg demo now 👍

@mzorz
Copy link
Contributor Author

mzorz commented Nov 21, 2018

The RichText blocks seem to not acquire focus/caret even though the block itself does get selected (I can see the inline toolbar appearing on each). I wonder if you see similar behavior on any of your devices.

Confirmed RichText is not fixed by this, but PlainText is 🤦‍♂️ . In fact that's what I have been trying all along, and only tried RichText on the emulator. I'll create another ticket for the proper handling of PlainText selection and associate this PR to it as this PR addresses such situation, and continue to work on #135 (RichText) on another PR.

@mzorz
Copy link
Contributor Author

mzorz commented Nov 21, 2018

PR description has been updated to reflect it fixes the problem for the RN PlainText component only (#267)

@mzorz
Copy link
Contributor Author

mzorz commented Nov 22, 2018

Closing this PR for now, as we're moving towards use of FlatList and removing RecyclerViewList as indicated in #256 (review)

@mzorz mzorz closed this Nov 22, 2018
@SergioEstevao SergioEstevao deleted the fix/editable-selectable branch November 8, 2019 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants