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

Indent action is inconsistent when paragraph is split with BR tags #381

Open
DouglasLivingstone opened this issue Apr 10, 2015 · 3 comments

Comments

@DouglasLivingstone
Copy link

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.

@hmgibson23
Copy link
Contributor

If you use the playground to replicate the output in Chrome and Firefox we can better diagnose the issue and see what's what in Scribe.

Thanks for the report.

@regiskuckaertz
Copy link
Contributor

@hmgibson23 if this is still occuring I can work on that. can we agree that pressing H2 should in fact produce:

<h2>test</h2><h2>test</h2><h2>test</h2>

like it would in a page layout/word processor software?

@hmgibson23
Copy link
Contributor

@regiskuckaertz - that sounds good to me.

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