diff --git a/core/misc/dialog/dialog.js b/core/misc/dialog/dialog.js index 8cac24c3c00..2a6430052e0 100644 --- a/core/misc/dialog/dialog.js +++ b/core/misc/dialog/dialog.js @@ -87,13 +87,13 @@ class DrupalDialogEvent extends Event { dialog.open = true; // Locks the body scroll only when it opens in modal. - if (settings.modal) { + if (event.settings.modal) { // Locks the body when the dialog opens. bodyScrollLock.lock(domElement); } domElement.dispatchEvent( - new DrupalDialogEvent('aftercreate', dialog, settings), + new DrupalDialogEvent('aftercreate', dialog, event.settings), ); }