7 border: solid
1px #
8bb8f4;
8 border-collapse: collapse;
13 <body onpaste=
"setTimeout(dump, 0)" contenteditable=
"true">
14 <p>This tests pasting into a table cell.
15 To manually run the test, copy the text below and paste it into the first text cell after the non-breaking space.
16 The content should be pasted into the first cell, not between two tds.
</p>
17 <div id=
"source">Drag me
</div>
18 <div id=
"result"><table width=
"400"><tbody><tr><td> </td><td> </td></tr><tr><td> </td><td> </td></tr></tbody></table></div>
19 <script src=
"../../resources/dump-as-markup.js"></script>
22 var source
= document
.getElementById('source');
23 getSelection().selectAllChildren(source
);
25 document
.execCommand('copy', false, null);
27 Markup
.description(document
.querySelector('p').textContent
);
28 Markup
.waitUntilDone();
31 Markup
.dump('result', '"Drag me" should appear inside the first td');
35 if (document
.queryCommandEnabled('paste')) {
36 getSelection().collapse(document
.querySelector('td').firstChild
, 1);
37 document
.execCommand('paste', false, null);