diff --git a/client/src/entrypoints/admin/modal-workflow.js b/client/src/entrypoints/admin/modal-workflow.js index 22c072f5c7..451c9e29df 100644 --- a/client/src/entrypoints/admin/modal-workflow.js +++ b/client/src/entrypoints/admin/modal-workflow.js @@ -29,7 +29,7 @@ function ModalWorkflow(opts) { if (useDialog) { self.dialog = document.getElementById(opts.dialogId); self.url = opts.url || self.dialog.dataset.url; - self.body = self.dialog.querySelector('[data-dialog-body]'); + self.body = self.dialog.querySelector('[data-w-dialog-target]'); // Clear the dialog body as it may have been populated previously self.body.innerHTML = ''; @@ -131,7 +131,7 @@ function ModalWorkflow(opts) { self.close = function () { if (useDialog) { - self.dialog.dispatchEvent(new CustomEvent('wagtail:hide')); + self.dialog.dispatchEvent(new CustomEvent('w-dialog:hide')); } else { self.container.modal('hide'); } diff --git a/wagtail/admin/templates/wagtailadmin/shared/dialog/dialog.html b/wagtail/admin/templates/wagtailadmin/shared/dialog/dialog.html index b652793197..d5156723ea 100644 --- a/wagtail/admin/templates/wagtailadmin/shared/dialog/dialog.html +++ b/wagtail/admin/templates/wagtailadmin/shared/dialog/dialog.html @@ -1,16 +1,16 @@ {% load wagtailadmin_tags i18n %} -