Skip to content
This repository has been archived by the owner on Jun 15, 2021. It is now read-only.

br tags in headings #481

Open
rinfex-holfer opened this issue Jun 7, 2016 · 1 comment
Open

br tags in headings #481

rinfex-holfer opened this issue Jun 7, 2016 · 1 comment

Comments

@rinfex-holfer
Copy link

rinfex-holfer commented Jun 7, 2016

It seems like <br> in h1/h2/h3 etc. tags makes document.execCommand('formatBlock', false, 'p') function work not the way it have to.

Way to reproduce bug at the demo-page:

  1. create three <p>-paragraphs
  2. select them
  3. click h2-button, so you get <h2>Hello, World!<br>Hello, World!<br>Hello, World!</h2>
  4. set caret after last <br> and try to click h2-button again to remove h2 tag. It will not work.
  5. If you wil set caret before <br> and try to click h2, at first it will remove <br>-tag and after another click it will acts like it have to.
@rrees
Copy link
Contributor

rrees commented Jun 7, 2016

Confirmed 😞 , works if the whole h2 is selected so has a workaround.

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

No branches or pull requests

3 participants