add modal enter/leave events