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

Fix: More block to handle Enter #10179

Merged
merged 2 commits into from Oct 2, 2018

Conversation

Projects
None yet
4 participants
@mkaz
Member

mkaz commented Sep 25, 2018

Description

Pressing enter in the Read More should behave like other blocks and simply create a new block and make all keyboard access a bit smoother.

Fixes #7324

How has this been tested?

Tested adding a Read More block and pressing enter.

Screenshots

read-more-results

Types of changes

Adds a onKeyDown listener to the More block which when checks for ENTER, when pressed will insert a new block below.

Updates unittest with new snapshot.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

@mkaz mkaz changed the title from Add listener to More block to handle Enter to Fix: More block to handle Enter Sep 25, 2018

@GlennMartin1

This comment has been minimized.

Show comment
Hide comment
@GlennMartin1

GlennMartin1 Sep 26, 2018

I'd love this to be in 4.0. 👍

GlennMartin1 commented Sep 26, 2018

I'd love this to be in 4.0. 👍

@mkaz

Updated to use getDefaultBlockName() instead of core/paragraph.

@mkaz mkaz merged commit 610aa4e into master Oct 2, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@mkaz mkaz deleted the fix/read-more/7324 branch Oct 2, 2018

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