1 <p>This tests for a bug where changing the alignment of an image would result in a selection that wasn't the one that was present before the alignment change. The image should be centered and the selection should be the same before and after the operation.
</p>
2 <div id=
"div" contenteditable=
"true">foo
<br><img src=
"../resources/abe.png"><br>baz
</div>
5 var div
= document
.getElementById("div");
6 var sel
= window
.getSelection();
9 sel
.modify("move", "forward", "paragraphBoundary");
10 sel
.modify("move", "forward", "character");
11 sel
.modify("extend", "forward", "character");
13 document
.execCommand("JustifyCenter");