31 lines
757 B
HTML
31 lines
757 B
HTML
<div> This test checks that non-form-control elements connect onfocus
|
|
and onblur to the focus and blur events, which do not bubble, not
|
|
DOMFocusIn and DOMFocusOut, which do bubble. focus and blur should
|
|
show up once each below.
|
|
|
|
<div id="console">
|
|
</div>
|
|
|
|
<script>
|
|
if (window.testRunner)
|
|
testRunner.dumpAsText();
|
|
|
|
function log(str)
|
|
{
|
|
document.getElementById("console").innerHTML += str + '<br>';
|
|
}
|
|
</script>
|
|
|
|
<div id="container" tabindex="-1" contentEditable="true" onfocus="log('focus')" onblur="log('blur')">
|
|
Text
|
|
<input id="input" type="text">
|
|
</div>
|
|
|
|
<script>
|
|
document.getElementById("input").focus();
|
|
document.getElementById("input").blur();
|
|
document.getElementById("container").focus();
|
|
document.getElementById("container").blur();
|
|
</script>
|
|
|