<!DOCTYPE html>
<pre></pre>
<dialog>
<input autofocus onfocus="log()">
<a href="http://www.google.com/">Help</a>
</dialog>
<script>
function log() {
document.querySelector('pre').textContent += 'FOCUS\n';
}
document.querySelector('dialog').show();
document.activeElement.blur();
</script>