mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: App event when modal is closed (#13722)
This commit is contained in:
parent
0dc96ce817
commit
5ea98b4df3
@ -170,12 +170,20 @@ const ApplicationRoute = DiscourseRoute.extend(OpenComposer, {
|
||||
const controller = getOwner(this).lookup(
|
||||
`controller:${controllerName}`
|
||||
);
|
||||
if (controller && controller.onClose) {
|
||||
|
||||
if (controller) {
|
||||
this.appEvents.trigger("modal:closed", {
|
||||
name: controllerName,
|
||||
controller: controller,
|
||||
});
|
||||
|
||||
if (controller.onClose) {
|
||||
controller.onClose({
|
||||
initiatedByCloseButton: initiatedBy === "initiatedByCloseButton",
|
||||
initiatedByClickOut: initiatedBy === "initiatedByClickOut",
|
||||
});
|
||||
}
|
||||
}
|
||||
modalController.set("name", null);
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user