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