Iframed Flutter hogs focus
It seems that focus cannot be taken OUT of an iframed flutter app.
Compare with commented-out code to see the expected behavior.
by David Iglesias
HTML
<div>
<div>
<input tabindex=0 type="text" value="Click here, press Tab" />
</div>
<iframe tabindex=0 src="https://dit-tests.web.app" frameborder="0"></iframe>
<!--
<iframe tabindex=0 src="https://fiddle.jshell.net/ditman/a0Luh1zq/show/light/" frameborder="0"></iframe>
-->
<div>
<input tabindex=0 type="text" value="unreachable via Tab" />
</div>
</div>
CSS
iframe {
width: 320px;
height: 200px;
margin: 16px 0px;
border: inset;
}
JavaScript
function focusEvt(e) {
console.log(e.type)
console.log('target', e.target);
console.log('related', e.relatedTarget);
console.log('---');
}
window.addEventListener('focus', focusEvt);
window.addEventListener('blur', focusEvt)
window.addEventListener('focusout', focusEvt);
window.addEventListener('focusin', focusEvt);