Skip to content

Modal UI: clickableOverlay option doesn't work #7399

Closed
@thdoan

Description

@thdoan

Preconditions

  1. Magento 2.1.2

Steps to reproduce

  1. Go into any template and create a modal widget with this code:
require(['Magento_Ui/js/modal/modal'], function(modal) {
  $('#some-element').click(function(e) {
    e.preventDefault();
    $('<p>Overlay content</p>').modal().modal('openModal');
  });
});
  1. Click on $('#some-element') to show the overlay.
  2. Click on the overlay (shadow).

Expected result

  1. According to the documentation, the default clickableOverlay value is true, which means "Close the modal window when a user clicks on the overlay".

Actual result

  1. Nothing happens (i.e., the overlay does not close). Even when you manually specify the option, it doesn't work:

$('<p>Overlay content</p>').modal({ clickableOverlay: true }).modal('openModal');

Metadata

Metadata

Labels

Component: CmsEvent: distributed-cdDistributed Contribution DayFixed in 2.1.xThe issue has been fixed in 2.1 release lineFixed in 2.2.xThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedbug report

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions