Fix a bug where 'hidden' events propagated from tooltips will close the modal.