Created
August 17, 2016 16:21
-
-
Save artisanalcode/75aa028399422bf69c515cee5b4eb1ed to your computer and use it in GitHub Desktop.
Little script to help debug focus/blur events on Chrome.
This file contains hidden or 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
/** | |
* Little script to help debug focus/blur events on Chrome. | |
* @note Since ChromeDev tools takes focus it creates an Observer Effect @see (https://en.wikipedia.org/wiki/Observer_effect_(physics). | |
* @author http://stackoverflow.com/users/2122682/aminimalanimal (Found in StackOverflow) | |
* @see http://stackoverflow.com/questions/8978039/debugging-onfocus-event-using-chrome-developer-tools-cant-return-focus-after-b | |
*/ | |
$('*').on( | |
'focus blur', | |
function(event) { | |
console.log(event.type + " to:"); | |
console.log(document.activeElement); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment