blob: a10a49a72d1667120e02295d420ca04b17d8849d [file] [log] [blame]
<html>
<head>
<script>
function log(msg)
{
document.getElementById('console').appendChild(document.createTextNode(msg + '\n'));
}
function test()
{
if (window.testRunner)
testRunner.dumpAsText();
var tf = document.getElementById('tf');
if (window.eventSender) {
eventSender.mouseMoveTo(10, tf.offsetTop + 3);
eventSender.mouseDown();
eventSender.mouseUp();
}
document.execCommand("InsertText", false, 'P');
document.execCommand("InsertText", false, 'A');
document.execCommand("InsertText", false, 'S');
document.execCommand("InsertText", false, 'S');
log(tf.value);
}
</script>
</head>
<body onload="test()">
This tests that you can set selection in an textfield contained in an anchor element even though we try to prevent selection from starting within anchor elements.<br>
<a href="javascript:void(0)">
<input id="tf">
</a>
<pre id="console"></pre>
</body>
</html>