added support for the legacy closeTriggers for legacy modals.