Created
April 22, 2021 18:34
-
-
Save nolanlawson/d8ddc518041e9bf12498b8b50b39df95 to your computer and use it in GitHub Desktop.
Repro Firefox focusin event issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Repro Firefox focusin event issue</title> | |
</head> | |
<body> | |
<h1>Repro Firefox focusin event issue</h1> | |
<div> | |
<input type="text"> | |
</div> | |
<script type="module"> | |
document.querySelector('div').addEventListener('focusin', event => { | |
console.log('focusin called', event.target, event.relatedTarget) | |
}) | |
document.addEventListener('DOMContentLoaded', () => { | |
document.querySelector('input').focus() | |
}) | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment