Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / selection / 5007143.html
blobea3f02eee24940542d314138ec3b7544e57c40d6
1 <p>This tests for a bug when moving the caret forward/backward by a line/paragraph. The horizontal position of the caret would be lost when moving the caret into an empty paragraph, when it should be preserved. The caret should be between the first and second 'x's in the third paragraph.</p>
2 <div id="div" contenteditable="true">
3 xxx<br>
4 xxx<br>
5 <br>
6 xxx<br>
7 </div>
9 <script>
10 var sel = window.getSelection();
11 sel.collapse(div, 0);
12 sel.modify("move", "forward", "character");
13 sel.modify("move", "forward", "line");
14 sel.modify("move", "forward", "line");
15 sel.modify("move", "forward", "line");
16 </script>