BZ-8751: add dismiss() to the common modalController