modal close/dismiss methods wait for modalOpenDeferred to resolve