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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/selection/select-element-paragraph-boundary.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 paragraphBoundary selection navigation. The caret should be at th e end of the paragraph below, just after the select box.</p> 5 <p>This tests paragraphBoundary selection navigation. The caret should be at th e end of the paragraph below, just after the select box.</p>
6 <div id="div" contenteditable="true"><select><option>1</option></select></div> 6 <div id="div" contenteditable="true"><select><option>1</option></select></div>
7 7
8 <script> 8 <script>
9 var sel = window.getSelection(); 9 var sel = window.getSelection();
10 var div = document.getElementById("div"); 10 var div = document.getElementById("div");
11 11 div.focus();
12 sel.collapse(div, 0); 12 sel.collapse(div, 0);
13 sel.modify("move", "forward", "paragraphBoundary"); 13 sel.modify("move", "forward", "paragraphBoundary");
14 </script> 14 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698