insert-paragraph-after-tab-span-and-text.html 668 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
<!DOCTYPE html>
<html>
<body>
<div id="test" contenteditable>
<span class="Apple-tab-span" style="white-space:pre">    hello</span><br>
<span class="Apple-style-span"><span class="Apple-tab-span" style="white-space: pre; ">    </span>world</span></div>
<script src="../../resources/dump-as-markup.js"></script>
<script>

document.body.focus();
var span = document.getElementsByClassName('Apple-tab-span')[0];
window.getSelection().setPosition(span, 1);
document.execCommand('InsertParagraph', false, null);

Markup.description('This test ensures WebKit inserts a paragraph separator properly at the end of a tab span.')
Markup.dump('test');

</script>
</body>
</html>