Closed
Description
Preconditions
- Magento 2.1.2
Steps to reproduce
- 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');
});
});
- Click on
$('#some-element')
to show the overlay. - Click on the overlay (shadow).
Expected result
- According to the documentation, the default
clickableOverlay
value istrue
, which means "Close the modal window when a user clicks on the overlay".
Actual result
- 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');