diff --git a/assets/javascripts/discourse/initializers/custom-wizard-edits.js.es6 b/assets/javascripts/discourse/initializers/custom-wizard-edits.js.es6 index 6d1410ad..0b5763a0 100644 --- a/assets/javascripts/discourse/initializers/custom-wizard-edits.js.es6 +++ b/assets/javascripts/discourse/initializers/custom-wizard-edits.js.es6 @@ -1,6 +1,7 @@ import DiscourseURL from "discourse/lib/url"; import { withPluginApi } from "discourse/lib/plugin-api"; import getUrl from "discourse-common/lib/get-url"; +import { observes } from "discourse-common/utils/decorators"; export default { name: "custom-wizard-edits", @@ -35,6 +36,16 @@ export default { }, }, }); + + api.modifyClass("component:uppy-image-uploader", { + // Needed to ensure appEvents get registered when navigating between steps + @observes("id") + initOnStepChange() { + if (/wizard-field|wizard-step/.test(this.id)) { + this._initialize(); + } + }, + }); }); }, };