Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: LayoutTests/editing/selection/4889598.html

Issue 14794012: Make contenteditable="false" element as atomic node for selection motion (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2013-05-27T14:00 Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <p>This tests for a bug moving down by a line from a line just above a ToDo, and moving up by a line from just below a ToDo.</p>
2 <div id="div" contenteditable="true">
3 <div id="above">Click anywhere in this line and move down.</div>
4 <table border="1" contenteditable="false"><tr><td>The caret <span style="color: blue;" contenteditable="true">should</span> always go into the editable region.< /td></tr></table>
5 <div id="below">Click anywhere in this line and move up.</div>
6 </div>
7
8 <script>
9 if (window.testRunner)
10 window.testRunner.dumpEditingCallbacks();
11 var selection = window.getSelection();
12 var above = document.getElementById("above").firstChild;
13 selection.setPosition(above, 0);
14 selection.modify("move", "forward", "line");
15 selection.setPosition(above, above.length);
16 selection.modify("move", "forward", "line");
17 var below = document.getElementById("below").firstChild;
18 selection.setPosition(below, 0);
19 selection.modify("move", "backward", "line");
20 selection.setPosition(below, below.length);
21 selection.modify("move", "backward", "line");
22 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698