Modal popup returns a promise