blob: c521b32f9f034eeb482aebfa9efba279930a25cc [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<p>This tests pasting into a table cell.
To manually run the test, copy some text and paste it after "1".
The content should be pasted into the first cell, not the second cell.</p>
<div id="result"><table border="1"><tbody><tr><td id="firstCell">1</td><td>3</td></tr></tbody></table></div>
<script src="../../resources/dump-as-markup.js"></script>
<script>
Markup.description(document.querySelector('p').textContent);
document.designMode = 'on';
var firstCell = document.getElementById('firstCell');
window.getSelection().setPosition(firstCell, 1);
document.execCommand("insertHTML", false, "<div>&nbsp;2</div>");
Markup.dump('result')
</script>
</body>
</html>