guardian/scribe

Indent action is inconsistent when paragraph is split with BR tags

Open

#381 ouverte le 10 avr. 2015

Voir sur GitHub
 (3 commentaires) (0 réactions) (0 assignés)JavaScript (265 forks)batch import
bughelp wanted

Métriques du dépôt

Stars
 (3 516 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

Using the live demo at http://guardian.github.io/scribe/ in Chrome 41 on Windows 8:

Step 1. Type test three times:

test
test
test

Which results in this HTML:

<p>test</p><p>test</p><p>test</p>

Step 2. Select all the text, then press H2 twice, which results in this HTML:

    <p>test<br>test<br>test</p>

Step 3. Press indent, results in this HTML:

    <blockquote><p>test</p><p>test</p><p>test</p></blockquote>

However, the selection now only extends to the "te" in the final "test", the "st" is unselected. Presumably due to the conversion from br to p tags.

Step 4. Press Outdent, results in this HTML:

    <p>test</p><p>test</p><p>te</p><blockquote><p><br></p><p>st</p></blockquote>

The "st" which ended up becoming deselected is still indented. Expected result is the html after step 1, with just three paragraph tags. The html at step 2 should probably match the html after step 1 too.

Guide contributeur