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

List block split problem with nested lists #874

Closed
hypest opened this issue Apr 16, 2019 · 7 comments

Comments

@hypest
Copy link
Contributor

commented Apr 16, 2019

List item creation has an issue that's not easy to describe. Look below for steps to reproduce.

To replicate:

(0. Using an external keyboard (like via Vysor) on Android)

  1. Use an example html with nested lists like this one:
<!-- wp:list -->
<ul><li>line 1<ul><li>line 21</li><li>line 22<ul><li>line 31</li><li>line 32</li></ul></li></ul></li><li>line 3</li><li>line 4</li><li>line 5</li></ul>
<!-- /wp:list -->
  1. Place the caret at the end of the "line 22" line and tap on Enter
  2. Notice the caret going at the start of the "line 31" line.
  3. Place the caret at the end of the "line 31" line and tap Enter again
  4. Notice a new list item appearing above the "line 32" line but, having a 1 char in it, which is now missing from the line above leaving that as "line 3"
@koke koke referenced this issue Apr 16, 2019
3 of 5 tasks complete
@hypest

This comment has been minimized.

Copy link
Contributor Author

commented Apr 17, 2019

👋 @koke , I think this issue is annoying but not a blocker for the code-freeze to re-enable lists, do you think otherwise perhaps?

@koke

This comment has been minimized.

Copy link
Member

commented Apr 29, 2019

I don't think it's a blocker right now (we have disabled the nested list buttons, right?), but let's put it on the project and get it sorted out for v2.

@hypest hypest added this to Future in Mobile Gutenberg via automation Apr 30, 2019

@hypest hypest moved this from Future to 2.0 Bugs in Mobile Gutenberg Apr 30, 2019

@koke koke moved this from 2.0 Bugs to List block issues in Mobile Gutenberg Apr 30, 2019

@SergioEstevao

This comment has been minimized.

Copy link
Contributor

commented Apr 30, 2019

@hypest I tested this on iOS and it now looks ok, are you still seeing this on Android?

@SergioEstevao SergioEstevao removed the iOS label Apr 30, 2019

@hypest

This comment has been minimized.

Copy link
Contributor Author

commented Apr 30, 2019

The issue is still happening on Android when using an external keyboard, like Vysor. But, step 3 doesn't happen when using the built-in virtual keyboard. Step 5 though does happen always on Android, even with the virtual keyboard.

On iOS, the issue still happens when running the demo app on an iPhone X 12.2 simulator. Gutenberg-mobile hash: 42d8443

nested-lists-enter-erroneous

@SergioEstevao

This comment has been minimized.

Copy link
Contributor

commented Apr 30, 2019

The issue is still happening on Android when using an external keyboard, like Vysor. But, step 3 doesn't happen when using the built-in virtual keyboard. Step 5 though does happen always on Android, even with the virtual keyboard.

On iOS, the issue still happens when running the demo app on an iPhone X 12.2 simulator. Gutenberg-mobile hash: 42d8443

nested-lists-enter-erroneous

@hypest can you make sure you have the correct version of Aztec iOS by runinng yarn preios. You need to have Aztec version 1.6.0

@hypest

This comment has been minimized.

Copy link
Contributor Author

commented Apr 30, 2019

I tried yarn preios before yarn ios but no change, I can still see the issue on iOS.

@SergioEstevao

This comment has been minimized.

Copy link
Contributor

commented May 2, 2019

I've been testing this for a while, and my main conclusion is that all this issue happen if there a sync problem between the native version of the HTML and whatever the JS side creates.

If the two string representations are not exactly the same in terms of text when you press Enter or press Delete we send an event from Native to JS that says we pressed Enter and a location. If the text doesn't match in one character the place you are seeing the cursor on the native component is not the same, the format library splits in a different place and we start to see strange results.

@SergioEstevao SergioEstevao added the iOS label May 2, 2019

@SergioEstevao SergioEstevao self-assigned this May 2, 2019

@koke koke moved this from List block issues to In review in Mobile Gutenberg May 16, 2019

Mobile Gutenberg automation moved this from In review to Done May 23, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.