| 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" ></scri
pt> | |
| 12 | |
| 13 <script> | |
| 14 | |
| 15 function editingTest() { | |
| 16 moveSelectionForwardByWordCommand(); | |
| 17 moveSelectionForwardByCharacterCommand(); | |
| 18 moveSelectionForwardByCharacterCommand(); | |
| 19 moveSelectionForwardByCharacterCommand(); | |
| 20 deleteCommand(); | |
| 21 deleteCommand(); | |
| 22 forwardDeleteCommand(); | |
| 23 forwardDeleteCommand(); | |
| 24 undoCommand(); | |
| 25 } | |
| 26 | |
| 27 </script> | |
| 28 | |
| 29 </head> | |
| 30 <body> | |
| 31 <div contenteditable id="root" class="editing"> | |
| 32 <span id="test">This wo<b>rd </b>should be selected, since the test deleted it a
character at a time and then did an undo.</span> | |
| 33 </div> | |
| 34 | |
| 35 <script> | |
| 36 if (window.internals) | |
| 37 internals.settings.setEditingBehavior("mac"); | |
| 38 runEditingTest(); | |
| 39 </script> | |
| 40 | |
| 41 </body> | |
| 42 </html> | |
| OLD | NEW |