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

[Android] List Block - Incorrect cursor position when splitting list item after space #929

Closed
mchowning opened this issue Apr 25, 2019 · 2 comments
Labels
Milestone

Comments

@mchowning
Copy link
Contributor

mchowning commented Apr 25, 2019

When splitting a list item at a point where the cursor is preceded by one or more spaces, the cursor will be moved "forward" when positioned on the new list item line. The number of characters it is moved forward will be equal to the number of spaces that preceded the cursor when the list item was split.

I believe this is occurring because we do not update the caret position in rich-text when spaces will be trimmed by Aztec.

output

⚠️ I do not have access to an iOS device, so I cannot verify whether this is an issue on iOS (seems unlikely though).

Test Scenarios

Scenario 1

  1. Create new List Block
  2. Enter two words separated by a space ('one two')
  3. Position the cursor at the beginning of the second word ('one |two'), so that there is one space preceding the cursor.
  4. Press Enter
  5. Observe that the cursor is positioned between the 1st and 2nd characters in the new list item ('t|wo'), instead of at the beginning.

Scenario 2

  1. Create new List Block
  2. Type 3 letters, 4 spaces (the second space will create a period), and 3 more letters. ('abc.
    def').
  3. Position the cursor between the second and third space ('abc. | def'), so that there are two spaces preceding the cursor.
  4. Press Enter
  5. Observe that the cursor is positioned between the 2nd and 3rd characters in the new list item ('de|f'), instead of at the beginning.
@mchowning mchowning mentioned this issue Apr 25, 2019
5 tasks
@mchowning mchowning changed the title [Android] List Block - Cursor position off when splitting list item after space [Android] List Block - Incorrect cursor position when splitting list item after space Apr 25, 2019
@iamthomasbishop
Copy link
Contributor

I was also seeing this (or something similar) happen on the Android alpha, where if write a list of a few items, then go to any previous li and hit enter, the new li created includes the last character from the previous li. Noted here: #897

@marecar3 marecar3 added the [Type] Bug Something isn't working label Apr 26, 2019
@marecar3 marecar3 added this to the v1.4 milestone Apr 26, 2019
@hypest
Copy link
Contributor

hypest commented May 3, 2019

Fixed by #928 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants