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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/selection/5099303.html

Issue 2709983005: Selection API: Do not change focus by Selection functions. (Closed)
Patch Set: . Created 3 years, 10 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 <p>This tests extending an editable selection across non-editable content. Ever ything in the region below should be selected.</p> 1 <p>This tests extending an editable selection across non-editable content. Ever ything in the region below should be selected.</p>
2 <div id="div" contenteditable="true">x<span contenteditable="false">xx</span>x</ div> 2 <div id="div" contenteditable="true">x<span contenteditable="false">xx</span>x</ div>
3 3
4 <script> 4 <script>
5 var sel = window.getSelection(); 5 var sel = window.getSelection();
6 var div = document.getElementById("div"); 6 var div = document.getElementById("div");
7 div.focus();
7 sel.collapse(div, 0); 8 sel.collapse(div, 0);
8 sel.modify("extend", "forward", "character"); 9 sel.modify("extend", "forward", "character");
9 sel.modify("extend", "forward", "character"); 10 sel.modify("extend", "forward", "character");
10 sel.modify("extend", "forward", "character"); 11 sel.modify("extend", "forward", "character");
11 </script> 12 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698