blob: fbf2950ae0608f168a48f571497a1e3ff7f0f0f1 [file] [log] [blame]
<html>
<head>
<style>
.editing {
border: 2px solid red;
font-size: 24px;
word-wrap: break-word;
-khtml-nbsp-mode: space;
-khtml-line-break: after-white-space;
}
</style>
<script src="../editing.js"></script>
<script src="../../resources/dump-as-markup.js"></script>
<title>Editing Test</title>
</head>
<body>
<p id="description"><b>This demonstrates a bug:</b> copying an empty line that's implemented with a br doesn't put an interchange newline on the pasteboard. There should be two blank lines after the 'a'.</p>
<div contenteditable="true" id="test">
<div class="editing">a<br><br>b</div>
<div class="editing"></div>
</div>
<script>
function editingTest() {
Markup.description(document.getElementById('description').textContent);
extendSelectionForwardByLineCommand();
extendSelectionForwardByLineCommand();
copyCommand();
moveSelectionForwardByLineCommand();
moveSelectionForwardByLineCommand();
Markup.dump('test', 'Before paste');
pasteCommand();
Markup.dump('test', 'After paste');
}
runEditingTest();
</script>
</body>
</html>