That's actually quite easy. onBlur, etc
Just to be precise, onBlur is a JavaScript event for an item that loses its focus, visibilitychange is what you actually need to detect tab changing.
Just to be precise, onBlur is a JavaScript event for an item that loses its focus, visibilitychange is what you actually need to detect tab changing.