Created
December 20, 2017 15:49
-
-
Save PhilippeVay/dcf9a60c15bd4ee4c1e903be2225f030 to your computer and use it in GitHub Desktop.
Logs the currently focused element #a11y
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
// Source: https://css-tricks.com/debugging-tips-tricks/#article-header-id-10 | |
// This logs the currently focused element, useful because opening the Devtools blurs the activeElement @marcysutton | |
$('body').on('focusin', function() { | |
console.log(document.activeElement); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment