blob: d10fabae336268cbbb2b0af3f4dbce782df380f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
<html>
<head>
<script src=../../editing/editing.js language="JavaScript" type="text/JavaScript" ></script>
<script>
function test()
{
var res = "";
document.getElementById('dv').focus();
copyCommand();
document.getElementById('tf').focus();
pasteCommand();
undoCommand();
}
</script>
</head>
<body onload="test()">
This test checks that undoing a paste into an empty text field doesn't cause it to collapse vertically. When running manually, you have to paste and undo by hand.
<br><br>
<input type="text" id="tf"></input>
<div contenteditable id="dv">Text to paste</div>
<div id="result">
</div>
</body>
</html>
|