3 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
5 function editingTest() {
7 window.getSelection().setBaseAndExtent(test.firstChild, 0, test.firstChild, 7);
9 moveSelectionForwardByCharacterCommand();
11 // Avoid printing nbsp
15 <title>Editing Test</title>
18 <h1>Smart paste when pasting a word with trailing whitespace after a word and a space before another word.</h1>
19 <p>To run this test manually, select "hello " (including trailing space), copy, and paste.</p>
21 <h2>Expected result</h2>
22 <p>A space should be added between the preexisting word and the word that's pasted.
23 No space should be added after the pasted word: <code>hello hello world</code></p>
25 <h2>Actual result</h2>
26 <div contenteditable id="root">
27 <div id="test" class="editing" style="font-size: 24px;">
32 runDumpAsTextEditingTest();