blob: 7348e16b7f8ee39c70c82955e9506417169eb1e6 [file] [log] [blame]
<html>
<head>
<script>
var numBlurs = 0;
function debug(str) {
var c = document.getElementById('console')
c.innerHTML += str + "<br>"
}
function finish() {
var f = document.getElementById('f')
f.innerHTML = '';
if (numBlurs)
debug('FAILURE: Onblur handler called!')
else
debug('SUCCESS!')
}
</script>
</head>
<body>
<p>This tests that elements shouldn't emit any onblur events when they are being removed from the document. To test this, click inside the input field. If If this test is successful, "SUCCESS" should be shown below, otherwise "FAILURE" is shown.</p>
<form id='f'>
<input onblur="numBlurs++" onfocus="setTimeout('finish()', 0)">
</form>
<pre id="console"></pre>
</body>
</html>