Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Little script to help debug focus/blur events on Chrome.
/**
* 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
You can’t perform that action at this time.