blob: d8d272707d971b01adcdbac305105631774ad815 [file] [log] [blame]
<p>This tests for a bug where centering two paragraphs would center the third. Only the selected paragraphs should be selected.</p>
<div id="div" contenteditable="true">foo<div>bar<br>baz</div>
<script>
var div = document.getElementById("div");
var sel = window.getSelection();
sel.setPosition(div, 0);
sel.modify("extend", "forward", "word");
sel.modify("extend", "forward", "paragraph");
document.execCommand("JustifyCenter");
</script>