implement beforeOpen event in ModalView

Close #11