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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/deleting/5099303.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 <p>This tests for a bug where deleting from the start of a paragraph after a tab le would leave the caret in the wrong position.</p> 1 <p>This tests for a bug where deleting from the start of a paragraph after a tab le would leave the caret in the wrong position.</p>
2 <div contenteditable="true"><table border="1"><tr><td>The caret should be betwee n these two parenthesis: (</td><td contenteditable="false"></td></tr></table><di v id="div">).</div></div> 2 <div contenteditable="true"><table border="1"><tr><td>The caret should be betwee n these two parenthesis: (</td><td contenteditable="false"></td></tr></table><di v id="div">).</div></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 document.querySelector("div").focus();
7 sel.collapse(div, 0); 8 sel.collapse(div, 0);
8 </script> 9 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698