Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currently when the dialog option "closeOnEscape" is set to false the close button "X" is hidden. This was added to get around a bug in core.
One use case would be to prevent a form from being accidentally closed (such as when using a touch device) but to still allow the user to cancel if required. A cancel button could be added, however the close button is more efficient and consistent with other modals.
In regards to compatibility:
- Hiding the close button is not the default behaviour of jQuery UI dialog
- Other methods can be used to hide the close button. See: "Hiding the close button"
- Hiding the close button is not the default behaviour of Bootstrap Static Modal
If Drupal core needs to use a true modal, where only an "Accept" or "I get it" type action will close it, then that's probably where it should be fixed.
Comment | File | Size | Author |
---|---|---|---|
#2 | show_dialog_close_button_when_closeonescape_false-3014134-2.patch | 607 bytes | imclean |
Comments
Comment #2
imclean CreditAttribution: imclean commentedComment #3
markhalliwellYeah... after doing a little more research into this, you're right... this needs to be removed.