| OLD | NEW |
| (Empty) |
| 1 <script> | |
| 2 if (window.testRunner) | |
| 3 testRunner.dumpEditingCallbacks(); | |
| 4 </script> | |
| 5 <p>This tests a change made with the fix for 8145. The paragraph separator inse
rted to prevent nesting blocks from the fragment to paste inside the block where
the paste occured was incorrectly inserted when the paste occured at the start
of a paragraph.</p> | |
| 6 <div id="test" style="border: 1px solid black;" contenteditable="true"></div> | |
| 7 | |
| 8 <script> | |
| 9 if (window.internals) | |
| 10 internals.settings.setEditingBehavior('mac'); | |
| 11 var s = window.getSelection(); | |
| 12 var p = document.getElementById("test"); | |
| 13 p.innerHTML = "foo<br>bar<br>baz"; | |
| 14 s.collapse(p, 0); | |
| 15 s.modify("move", "forward", "word"); | |
| 16 s.modify("move", "forward", "character"); | |
| 17 var html = "<div>foo</div>bar"; | |
| 18 document.execCommand("InsertHTML", false, html); | |
| 19 </script> | |
| OLD | NEW |