Trow tpl_closed event when detecting that the view is no longer visible.