caret-painting-after-paste-undo.html 593 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
<html>
<head>
<script src="../editing.js" language="JavaScript" type="text/JavaScript"></script>
<script>
function editingTest() {
 doubleClick(0, 0);
 copyCommand();
 var editor = document.getElementById("editor");
 editor.focus();
 pasteCommand();
 undoCommand();
}
</script>
</head>
<body onLoad="runEditingTest();">
<div>To run this test, copy some text, paste it into the box below, and then undo.
 The caret should be positioned respecting the box's border and padding.</div><br>
<div id="editor" contenteditable=true style="border:2px inset #eee; padding: 5px;">
</div>
</body>
</html>