-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modal UI: clickableOverlay option doesn't work #7399
Comments
+1 , The z-index of the popup is higher than the .modals-overlay, but the popup wrapper covers the whole screen area, making the overlay unclickable.Increasing the z-index of the .modals-overlay makes the click-to-close work, but the popup is then put behind whatever the background colour of the .modals-overlay is . . . |
I've encountered this issue on multiple projects. |
We created a workaround for this issue in a custom theme using a RequireJS mixin by adding the following files:
|
Hi @thdoan thanks for report |
@erikhansen Unfortunately for me that fix works on desktop (popup) but breaks mobile (slide) modals... |
@BB-000 Yeah, we discovered some issues with the code I posted previously and have since refactored and moved the code into a standalone extension called ClassyLlama_ModalEnhancements. I've attached it to this comment. Use at your own risk. |
@erikhansen It's working. Please create a PR :) |
@thdoan, thank you for your report. |
hi when upgrade with ClassyLlama_ModalEnhancements.zip module but still modal not close when click overlay. any idea why |
Hi @thdoan. Thank you for your report. The fix will be available with the upcoming 2.1.15 release. |
Hi @thdoan. Thank you for your report. The fix will be available with the upcoming 2.3.0 release. |
I do not see this fix in the Magento 2.2.5 release |
.modal-popup { pointer-events: none; } |
This is not fixed in 2.2. The CSS for pointer-events is present, but modal.js doesn't actually handle a click on the overlay. clickableOverlay is present in the default options, but it's not found anywhere else in the file (meaning it's not used). Comparing 2.1, 2.2, and 2.3, the _createOverlay method is lacking lines in 2.2. |
Hi @engcom-Charlie. Thank you for working on this issue.
|
Hello @zaximus84 |
Still a problem in Magento 2.3.0 |
Hello, made it work by applying a small css fix (if anyone is still interested):
|
ACP2E-120: Magento_Fedex Package description and handling fee issue
Preconditions
Steps to reproduce
$('#some-element')
to show the overlay.Expected result
clickableOverlay
value istrue
, which means "Close the modal window when a user clicks on the overlay".Actual result
$('<p>Overlay content</p>').modal({ clickableOverlay: true }).modal('openModal');
The text was updated successfully, but these errors were encountered: