| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 | |
| 4 <style> | |
| 5 .editing { | |
| 6 border: 2px solid red; | |
| 7 padding: 12px; | |
| 8 font-size: 24px; | |
| 9 } | |
| 10 </style> | |
| 11 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script
> | |
| 12 | |
| 13 <script> | |
| 14 | |
| 15 function editingTest() { | |
| 16 for (i = 0; i < 22; i++) { | |
| 17 moveSelectionForwardByCharacterCommand(); | |
| 18 } | |
| 19 deleteCommand(); | |
| 20 | |
| 21 // This should not be necessary, but due to the following bug, the caret | |
| 22 // does not repaint in the proper position. Changing the size of the DIV | |
| 23 // is a workaround. The bug: | |
| 24 // <rdar://problem/3608445>: Garbage characters rendered after doing delete.
Resize makes them go away. | |
| 25 changeRootSize(); | |
| 26 | |
| 27 } | |
| 28 | |
| 29 </script> | |
| 30 | |
| 31 <title>Editing Test</title> | |
| 32 </head> | |
| 33 <body> | |
| 34 <div contenteditable id="root" class="editing"> | |
| 35 <span id="test">Fourscore | |
| 36 and seven <br><br><br>years ago</span> | |
| 37 </div> | |
| 38 | |
| 39 <script> | |
| 40 runEditingTest(); | |
| 41 </script> | |
| 42 | |
| 43 </body> | |
| 44 </html> | |
| OLD | NEW |