dialogClass is deprecated in jQuery UI, dialog class not added to element on Drupal 10.4.0

Created on 8 April 2025, 8 days ago

Problem/Motivation

In the `webform.confirmation.modal.js` file, a dialog is created using `Drupal.dialog()`. This method utilizes a setting called `dialogClass`, which adds a class called `webform-confirmation-modal` to the outermost `div` of the dialog HTML. We use this class for theming the dialog produced by this module.

After updating to Drupal 10.4.5, the dialog is now displayed differently because the `webform-confirmation-modal` class is no longer being applied. While this may be a bug in Drupal core (since the class is supposed to be deprecated, not removed), I will report this issue on Drupal.org. In the meantime, here are instructions for a potential fix: https://jqueryui.com/upgrade-guide/1.12/#deprecated-dialogclass-in-favor...

Steps to reproduce

1. Update to Drupal 10.4.0
2. Create webform and enable modal confirmation dialog
3. Submit webform and see confirmation dialog "webform-confirmation-modal" class is missing in outermost div of modal

Proposed resolution

Replace the usage of dialogClass with:

classes: {
'ui-dialog': 'commerce-confirmation-popup'
},

🐛 Bug report
Status

Active

Version

6.2

Component

Code

Created by

🇮🇳India Nilesh Chhantbar

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

Comments & Activities

Production build 0.71.5 2024