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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/selection/mixed-editability-8.html

Issue 2709983005: Selection API: Do not change focus by Selection functions. (Closed)
Patch Set: . Created 3 years, 9 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
OLDNEW
1 <script> 1 <script>
2 if (window.testRunner) 2 if (window.testRunner)
3 testRunner.dumpEditingCallbacks(); 3 testRunner.dumpEditingCallbacks();
4 </script> 4 </script>
5 <p>This tests moving the caret backward through content of mixed editability. Th e caret should end up back at the start of the editable text inside the table.</ p> 5 <p>This tests moving the caret backward through content of mixed editability. Th e caret should end up back at the start of the editable text inside the table.</ p>
6 6
7 <div contenteditable="true"> 7 <div contenteditable="true">
8 editable 8 editable
9 <table border="1" contenteditable="false"><tbody><tr><td><div style="display:inl ine-block; "><span>static</span><span id="test" contenteditable="plaintext-only" >editable</span></div></td></tr></tbody></table> 9 <table border="1" contenteditable="false"><tbody><tr><td><div style="display:inl ine-block; "><span>static</span><span id="test" contenteditable="plaintext-only" >editable</span></div></td></tr></tbody></table>
10 editable 10 editable
11 </div> 11 </div>
12 12
13 <script> 13 <script>
14 var e = document.getElementById("test"); 14 var e = document.getElementById("test");
15 var s = window.getSelection(); 15 var s = window.getSelection();
16 document.querySelector("div").focus();
16 17
17 s.collapse(e, 0); 18 s.collapse(e, 0);
18 s.modify("move", "forward", "character"); 19 s.modify("move", "forward", "character");
19 20
20 s.modify("move", "backward", "word"); 21 s.modify("move", "backward", "word");
21 </script> 22 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698