blob: ee6c74197c240fe4958759fb417533e7f6934718 [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().collapse(firstCell, 1);
document.execCommand("insertHTML", false, "<div>&nbsp;2</div>");
Markup.dump('result')
</script>
</body>
</html>