Move the dialog close function to the base class.