19 lines
562 B
HTML
19 lines
562 B
HTML
<title>This tests for a repaint bug. The old caret position should be invalidated when a paragraph separator is inserted.</title>
|
|
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
|
|
<script type="text/javascript">
|
|
function repaintTest() {
|
|
document.execCommand("InsertParagraph");
|
|
}
|
|
</script>
|
|
<body onload="runRepaintTest();">
|
|
<div contenteditable="true">
|
|
<div><br></div>
|
|
<div id="div"><br></div>
|
|
</div>
|
|
<script>
|
|
var div = document.getElementById("div");
|
|
var sel = window.getSelection();
|
|
sel.setPosition(div, 0);
|
|
</script>
|
|
</body>
|