don't trigger handlers on close when we're leaving the page