3 testRunner
.dumpEditingCallbacks();
7 border:
1px solid black;
11 <p>When ReplaceSelectionCommand deletes the current selection, it should request that the deletion do a merge in some cases (normally, though, it should ask that a merge not be done, because a merge will cause information about block nesting to be lost). It wasn't requesting a merge in cases where it should have.
</p>
12 <p>The failing case is where the incoming fragment has more than one block, and the selection being pasted into ends at the end of a paragraph. Any time the selection being pasted into ends at the end of a paragraph, deleting will leave leave a) a br or b) an empty block at the end of the deleted selection. So, not merging will leave an extraneous empty line or a collapsed block after the paste operation.
</p>
13 <div id=
"test" contenteditable=
"true"><div style=
"border: 1px solid red;">bar
</div><div style=
"border: 1px solid blue;">bar
<br></div></div>
16 var s
= window
.getSelection();
17 var e
= document
.getElementById("test");
20 s
.modify("move", "forward", "character");
21 s
.modify("extend", "forward", "line");
22 s
.modify("extend", "forward", "line");
23 document
.execCommand("InsertHTML", false, "<div>foo</div><div>bar</div>");