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: list breaks when a new subitem is added using the keyboard. #10701

Closed
pagelab opened this issue Oct 17, 2018 · 5 comments · Fixed by #10799
Closed

List block: list breaks when a new subitem is added using the keyboard. #10701

pagelab opened this issue Oct 17, 2018 · 5 comments · Fixed by #10799
Assignees
Labels
[Block] List Affects the List Block [Priority] High Used to indicate top priority items that need quick attention [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release
Milestone

Comments

@pagelab
Copy link
Contributor

pagelab commented Oct 17, 2018

Describe the bug
Using the keyboard to add a new subitem in a list breaks the list.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new "List" block.
  2. Add any text to create some items.
  3. Select at least one of these items and click on the "Indent list item" icon to create one o more subitems.
  4. Now, click on the end of one of the subitems and hit "Return" in your keyboard.
  5. The list will break as a result.

Expected behavior
To create new subitems, would be sufficient to hit "Return" while the cursor is at the end of a subitem. This is how main items on the list are created by default, but it doesn't work for subitems.

You can only create subitems by clicking on the "Indent list item" icon. The keyboard can't be used for this at all or the list will break.

Screenshots

list-block-subitem-issue

Desktop:

  • MacOS X 10.12
  • Chrome 69

Additional context

  • Gutenberg 4.0.0
  • WordPress 4.9.8
  • Twenty Seventeen.
  • No other plugins.
@designsimply
Copy link
Member

Good find! Tested and confirmed using WordPress 4.9.8 and Gutenberg 4.0 with Firefox 62.0.3 on macOS 10.13.6. (2m5s)

@designsimply designsimply added [Type] Bug An existing feature does not function as intended [Block] List Affects the List Block labels Oct 17, 2018
@designsimply designsimply added this to the 4.1 - UI freeze milestone Oct 17, 2018
@ellatrix
Copy link
Member

Thanks, working on it :)

@pagelab pagelab mentioned this issue Oct 18, 2018
5 tasks
@ellatrix
Copy link
Member

I have a fix for this, but it needs more tests. I'll finish it tomorrow.

@ellatrix
Copy link
Member

Also noticed some other issues with nested blocks and serialisation.

@ellatrix ellatrix added the [Priority] High Used to indicate top priority items that need quick attention label Oct 18, 2018
@youknowriad
Copy link
Contributor

Punted but if it makes the cut for 4.1, we include it. We can also include it during RC period as it's an important bug fix.

@ellatrix ellatrix added the [Type] Regression Related to a regression in the latest release label Oct 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] List Affects the List Block [Priority] High Used to indicate top priority items that need quick attention [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants