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

Fix for Enter.key pressed at the end of Heading block that does create another Heading block #787

Conversation

daniloercoli
Copy link
Contributor

This PR fixes the problem where pressing enter.KEY at the end of a Heading block, it does create another Heading block. Fixes #734

Expectation: Pressing enter on a Heading block, should create a Paragraph block. Same as on any other "split-able" block.

Testing A

  • Start the demo app
  • Put the caret at the end of a Heading block
  • Press enter.key
  • It should create a new para after it

Testing B

  • Start the demo app
  • Put the caret at the middle of a Heading block
  • Press enter.key
  • It should create a new heading after it, with the content on the right of the caret

This PR is a bug fix, but we may need to put an eye on this other PR here that modifies the default behaviour of the Heading block when pressing Enter.key at the beginning of it.

Copy link
Contributor

@mzorz mzorz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@daniloercoli daniloercoli merged commit c0a21d2 into develop Mar 27, 2019
@daniloercoli daniloercoli deleted the issue/734-Enter-on-Heading-block-creates-another-Heading-block branch March 27, 2019 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enter on Heading block creates another Heading block.
2 participants