Vérifiez si l'élément enfant est focusd
var focused = document.hasFocus();
Selfish Snake
var focused = document.hasFocus();