auto-close pop-up if player close detected