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

Keyboard disabled after turning paragraph into list #2558

Closed
jamiebergen opened this Issue Aug 27, 2017 · 4 comments

Comments

Projects
4 participants
@jamiebergen

jamiebergen commented Aug 27, 2017

Issue Overview

If I start an ordered list by typing "1. " into a paragraph block, it will automatically indent the number and convert the block into a list, but I can't enter additional text until I click back into the block - even though the blinking cursor is visible after the number.

Steps to Reproduce (for bugs)

  1. Open a post using the Gutenberg editor.
  2. Click the "+" Insert block icon.
  3. Select the Paragraph block.
  4. Type "1. " (note the space after the dot)
  5. Attempt to type the content for the first list item.

Expected Behavior

I should be able to type the content for the first list item, and it should output where the blinking cursor appears after "1. ".

Current Behavior

The blinking cursor displays, but what I type doesn't appear. I have to click back into the block to be able to add content after the "1. ".

@EphoxJames

This comment has been minimized.

Contributor

EphoxJames commented Aug 28, 2017

I can confirm. The bug seems to be a selection/focus issue:

When the keyboard doesn't work the activeElement and selection is as follows:
activeElement: <ol class="blocks-editable__tinymce mce-content-body" aria-label="Write list…" id="mce_5" data-is-placeholder-visible="false" contenteditable="true"> selection: Selection { anchorNode: <ol#mce_5.blocks-editable__tinymce.mce-content-body>, anchorOffset: 0, focusNode: <ol#mce_5.blocks-editable__tinymce.mce-content-body>, focusOffset: 0, isCollapsed: true, rangeCount: 1, caretBidiLevel: null }

As soon as you click the editor again it changes to this:
activeElement: <ol class="blocks-editable__tinymce mce-content-body" aria-label="Write list…" id="mce_5" data-is-placeholder-visible="false" contenteditable="true"> selection: Selection { anchorNode: <li>, anchorOffset: 0, focusNode: <li>, focusOffset: 0, isCollapsed: true, rangeCount: 1, caretBidiLevel: 0 }

@EphoxJames

This comment has been minimized.

Contributor

EphoxJames commented Aug 28, 2017

It seems that the selection is being set to the ordered list instead of the list item.

@EphoxJames

This comment has been minimized.

Contributor

EphoxJames commented Aug 28, 2017

I don't know why using the "+" menu would change this though.

@anna-harrison anna-harrison added this to Under Consideration in Ephox Team Oct 9, 2017

@youknowriad

This comment has been minimized.

Contributor

youknowriad commented Dec 22, 2017

This works well for me now. Closing. Feel free to reopen if I missed something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment