[css-grid] Scroll reset position when updating inner html on content
[WebKit-https.git] / LayoutTests / editing / deleting / delete-and-undo.html
1 <html> 
2 <head>
3
4 <style>
5 .editing { 
6     border: 2px solid red; 
7     padding: 12px; 
8     font-size: 24px; 
9 }
10 .explanation { 
11     border: 2px solid blue; 
12     padding: 12px; 
13     font-size: 24px; 
14     margin-bottom: 24px;
15 }
16 </style>
17 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
18
19 <script>
20
21 function editingTest() {
22     for (i = 0; i < 4; i++)
23         moveSelectionForwardByCharacterCommand();
24     for (i = 0; i < 5; i++)
25         extendSelectionForwardByCharacterCommand();
26     for (i = 0; i < 5; i++)
27         deleteCommand();
28     undoCommand();
29     moveSelectionForwardByCharacterCommand();
30 }
31
32 </script>
33
34 <title>Editing Test</title> 
35 </head> 
36 <body>
37 <div class="explanation">
38 Should see "foo bar baz" in the red box. Insertion point should be between the "b" and "a" of "baz".
39 </div>
40
41 <div id="root" contenteditable="true" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
42 <div id="test" class="editing">foo bar baz</div></div>
43
44 <script>
45 runEditingTest();
46 </script>
47
48 </body>
49 </html>