blob: 9b30c2ea5b83e73dd685b4cabf8e474cdcb61625 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<p id="description">This tests copying and pasting text does not remove non-editing style in the destination.
To manually test, copy "hello world" below and paste it in the box below. The blue border should stay after the paste.</p>
<div id="source" contenteditable><i>hello</i></div>
<div id="destination" style="padding:20px;" contenteditable><b style="border: solid 5px blue;padding: 5px;"><br></b></font></div>
<script src="../../resources/dump-as-markup.js"></script>
<script>
if (window.testRunner)
testRunner.dumpAsText();
Markup.description(document.getElementById('description').textContent);
Markup.dump('destination', 'Before copy');
document.getElementById('source').focus();
document.execCommand('SelectAll', false, null);
document.execCommand('Copy', false, null);
document.getElementById('destination').focus();
document.execCommand('Paste', false, null);
Markup.dump('destination', 'After paste');
</script>
</body>
</html>