DEV: Replace `HideModalTrigger` with JS logic (#21746)

No need to set up a whole component here - we can just call the necessary JS directly from the `closeModal` function.

(extracted from https://github.com/discourse/discourse/pull/21304)
This commit is contained in:
David Taylor 2023-05-25 13:17:55 +01:00 committed by GitHub
parent f0dfe56870
commit db54b80275
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 8 deletions

View File

@ -1,7 +0,0 @@
import Component from "@ember/component";
export default Component.extend({
didInsertElement() {
this._super(...arguments);
$(".d-modal.fixed-modal").modal("hide");
},
});

View File

@ -168,6 +168,7 @@ const ApplicationRoute = DiscourseRoute.extend(OpenComposer, {
}
this.render("hide-modal", { into: "modal", outlet: "modalBody" });
$(".d-modal.fixed-modal").modal("hide");
if (controllerName) {
const controller = getOwner(this).lookup(

View File

@ -1 +0,0 @@
<HideModalTrigger />