I have observed an undesirable behaviour in Chrome that occurs when one joins two <p>
's by deleting the separation between them. Although the <p>
tags are joined properly, Chrome wraps the right-most <p>
tag's content with a <span>
.
Edit: this happens for all block elements, not just p
tags.
Example:
For example, when the separating </p><p>
are deleted from the following block:
<div contenteditable="true"><p>p one.</p><p>p two.</p></div>
It becomes:
<div contenteditable="true"><p>p one.<span style="font-size: 16px; line-height: 1.44;">p two.</span></p>
Example in a fiddle: Chrome wrapping contents of joined <p>
with a <span>
.
Question:
Is there an easy way to prevent chrome from doing this? It results in horrible markup that I'd like very much to be rid of.