blob: 626e1feb5d371d12180fdb358018076835607ffd [file] [log] [blame]
<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>