Drupal.dialog openDialog should use event settings

Created on 4 September 2024, 4 months ago
Updated 20 September 2024, 4 months ago

Problem/Motivation

In https://git.drupalcode.org/project/drupal/-/blob/11.x/core/misc/dialog/d...

      // Trigger a global event to allow scripts to bind events to the dialog.
      const event = new DrupalDialogEvent('beforecreate', dialog, settings);
      domElement.dispatchEvent(event);
      $element.dialog(event.settings);

The rest of the function code should keep using event.settings and not the settings variable in order to take alterations into account.

This was found by https://www.drupal.org/u/tocab β†’ when discussing about ✨ Replace Core modal and offcanvas by Bootstrap's one Needs review and confirmed by https://www.drupal.org/u/nod_ β†’

Proposed resolution

Keep using event.settings

Remaining tasks

Provide MR
review

πŸ› Bug report
Status

Fixed

Version

10.3 ✨

Component
JavascriptΒ  β†’

Last updated about 5 hours ago

Created by

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024