guardian/scribe

br tags in headings

Open

#481 aberto em 7 de jun. de 2016

Ver no GitHub
 (1 comment) (0 reactions) (0 assignees)JavaScript (265 forks)batch import
bughelp wanted

Métricas do repositório

Stars
 (3.516 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

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.

Guia do colaborador