4 <script src=
"../../resources/js-test.js"></script>
6 <div contenteditable
>Also bug if moved to here
</div>
7 <div contentEditable
>Bug if moved to here
</div>
8 <div id=
"before" contenteditable
>Selection starts here, and should not go out from here
</div>
9 <div contenteditable
>Bug if moved to here
</div>
10 <div contenteditable
>Also bug if moved to here
</div>
13 description("Ensure that moving a selection does not skip adjacent contenteditable if the current is contentEditable.");
15 var before
= document
.getElementById("before");
16 var selection
= window
.getSelection();
17 selection
.collapse(before
, 0);
18 selection
.modify("move", "backward", "character");
19 shouldBe("selection.focusNode.parentElement", "before");
21 selection
.collapse(before
, 1);
22 selection
.modify("move", "forward", "character");
23 shouldBe("selection.focusNode.parentElement", "before");