OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <head> | |
3 <style> | |
4 blockquote { | |
5 color: blue; | |
6 border-left: 2px solid blue; | |
7 padding-left: 5px; | |
8 margin: 0px; | |
9 } | |
10 </style> | |
11 </head> | |
12 <body> | |
13 <p id="description">We copy and paste a blockquoted paragraph plus a paragraph b
reak. | |
14 The paragraph break shouldn't be inside the blockquote on paste. | |
15 You should see 'hello' (blockquoted), 'world' (not quoted, black text), 'hello'
(blockquoted), empty paragraph. | |
16 See <rdar://problem/5368833<</p> | |
17 <div id="div" contenteditable="true"><br><blockquote id="blockquote" type="cite"
>hello<br></blockquote><br></div> | |
18 <script src="../../resources/dump-as-markup.js"></script> | |
19 <script> | |
20 div = document.getElementById("div"); | |
21 blockquote = document.getElementById("blockquote"); | |
22 sel = window.getSelection(); | |
23 sel.setBaseAndExtent(blockquote, 0, div, 2); | |
24 document.execCommand("Copy"); | |
25 sel.setPosition(div, 0); | |
26 | |
27 Markup.description(document.getElementById('description').textContent); | |
28 | |
29 Markup.dump(div, 'Before paste'); | |
30 document.execCommand("Paste"); | |
31 Markup.dump(div, 'After paste'); | |
32 document.execCommand("InsertHTML", false, "world"); | |
33 Markup.dump(div, 'After inserting "world"'); | |
34 </script> | |
35 </body> | |
36 </html> | |
OLD | NEW |