blob: 8f03f32bec80af3455d8c71c08e2d75c19849695 [file] [log] [blame]
<html>
<head>
<script>
function test()
{
if (window.testRunner) {
eventSender.mouseMoveTo(25, 55);
eventSender.mouseDown();
eventSender.mouseUp();
}
}
function prevDefaultForEvent( evt ) {
log(evt.type + " on target " + evt.target);
evt.preventDefault();
}
function log(text) {
document.getElementById('result').innerHTML = document.getElementById('result').innerHTML + "<br>" + text;
}
</script>
</head>
<body onload="test()">
<br>
This tests that preventDefault called onmousedown will prevent a caret from being placed in the text field.
<input id="tf1" style="-khtml-appearance: textfield; position: absolute; top: 50; left: 10;" onmousedown="prevDefaultForEvent(event)" value="No caret should be here"></input>
<div id="result" style="position: absolute; top: 70; left: 10;">
</div>
</body>
</html>