blob: f35f81dcd3553ae660356075ada81d4f5bd42116 [file] [log] [blame]
mjsd85e3282007-07-20 22:35:50 +00001<script>
2function test()
3{
rniwa@webkit.orgada3c202012-06-20 03:28:42 +00004 if (!window.testRunner)
mjsd85e3282007-07-20 22:35:50 +00005 return;
6
rniwa@webkit.orgada3c202012-06-20 03:28:42 +00007 testRunner.dumpAsText();
8 testRunner.waitUntilDone();
mjsd85e3282007-07-20 22:35:50 +00009
10 var element = document.getElementById("elem");
11 element.focus();
12 element.onchange();
13}
14function failed()
15{
16 document.getElementById("console").innerHTML = "blur event fired, FAILED!";
17 window.location = 'resources/no-blur-result.html/#FAILED';
rniwa@webkit.orgada3c202012-06-20 03:28:42 +000018 testRunner.notifyDone();
mjsd85e3282007-07-20 22:35:50 +000019}
20
21</script>
22<body onload="test();">
23onblur should not fire if an element has focus when navigating away from the page<br>
24<a href="rdar://problem/5326303">rdar://problem/5326303</a><br>
25<select id="elem" onchange="window.location='resources/no-blur-result.html';" onblur="failed()">
26<option>CHANGE ME</option>
27<option>PICK ME</option>
28</select>
29<pre id=console>
30</pre>
31</body>