fix triggering opened before dialog is appended to DOM