[css-grid] Scroll reset position when updating inner html on content
[WebKit-https.git] / LayoutTests / editing / deleting / 5206311-1.html
1 <script>
2 function runTest(num)
3 {
4     sel = window.getSelection();
5     start = document.getElementById("test" + num + "start");
6     end = document.getElementById("test" + num + "end");
7     sel.setBaseAndExtent(start, 0, end, end.childNodes.length);
8     document.execCommand("Delete");
9 }
10 </script>
11
12 <p>This empties a row (the second).  It should be removed. <b>This demonstrates a bug: the two cells that contained the ends of the selection aren't given a placeholder and so appear differently than the other emptied cells.</b></p>
13 <div contenteditable="true">
14 <table border="1">
15 <tr><td>1</td><td id="test1start">2</td><td>3</td></tr>
16 <tr><td>4</td><td>5</td><td>6</td></tr>
17 <tr><td>7</td><td id="test1end">8</td><td>9</td></tr>
18 </table>
19 </div>
20
21 <script>runTest(1);</script>
22
23
24 <p>This empties a row (the second), but it still contains the selection and so shouldn't be removed.</p>
25 <div contenteditable="true">
26 <table border="1">
27 <tr><td>1</td><td>2</td><td>3</td></tr>
28 <tr><td id="test2start">4</td><td>5</td><td id="test2end">6</td></tr>
29 <tr><td>7</td><td>8</td><td>9</td></tr>
30 </table>
31 </div>
32
33 <script>runTest(2);</script>
34
35 <p>This empties the first row, it should be removed.</p>
36 <div contenteditable="true">
37 <div>Hello <span id="test3start">world!</span></div>
38 <table border="1">
39 <tr><td>1</td><td>2</td><td>3</td></tr>
40 <tr><td>4</td><td id="test3end">5</td><td>6</td></tr>
41 <tr><td>7</td><td>8</td><td>9</td></tr>
42 </table>
43 </div>
44
45 <script>runTest(3);</script>