Added onDialogClosed event