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

Unexpected behavior when pressing line break at the ending of paragraph #1340

Closed
vasconita opened this issue Mar 1, 2017 · 3 comments
Closed

Comments

@vasconita
Copy link

Unexpected behavior when pressing line break at the ending of paragraph

It's related to #1339, but I created two issues because I'm not sure if it's the same problem.

Steps for Reproduction

  1. Visit quilljs.com
  2. Write a line with heading style
  3. Enter line break
  4. Write other line

breakeline1

Expected behavior: I expect to preserve my heading style.

Actual behavior: It changes the style of my paragraph to normal

Platforms: Google Chrome 56.0.2924.87 (64-bit) in Windows 10

Version: 1.2.2

@borodean
Copy link

borodean commented Mar 1, 2017

Not a Quill contributior, but I think this behavior is valid – Word and Google Docs behave the same way. To split the heading and keep the style you should insert an actual line break: shift + enter.

@jhchen
Copy link
Member

jhchen commented Mar 3, 2017

Yes the two issues are separate so thank you for creating two. As @borodean suggested this was intentionally added in #540. You can override this behavior if you'd like with a keyboard config. Note from the docs, because enter is specially handled, it will have to be specified in the configuration, not with addBinding.

@jhchen jhchen closed this as completed Mar 3, 2017
@vasconita
Copy link
Author

Thank you very much, I'll override this behavior with a keyboard config :)

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

No branches or pull requests

3 participants