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:

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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

imclean created an issue. See original summary.

imclean’s picture

Status: Active » Needs review
FileSize
607 bytes
markhalliwell’s picture

Title: Show dialog close button when closeOnEscape is false » Close button disappears when closeOnEscape is true
Category: Feature request » Bug report
Status: Needs review » Fixed

Yeah... after doing a little more research into this, you're right... this needs to be removed.

  • markcarver committed 2c7a973 on 8.x-3.x authored by imclean
    Issue #3014134 by imclean: Close button disappears when closeOnEscape is...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.