Topic: MDB Pro 4.4.1 - Modal will not close
richp pro asked 7 years ago
I'm using MDB Pro 4.4.1. I'm having an issue with the modal. I am able to open the modal, but I am unable to select or close the model once it is open. It looks like the modal may be behind the mask. Possibly a z-index issue? What's the best way to correct this?
I used the Basic example modal code found here: https://mdbootstrap.com/javascript/modals/
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Opened
Specification of the issue
- ForumUser: Pro
- Premium support: No
- Technology: MDB jQuery
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No
Tags
richp pro commented 7 years ago
In case anyone else come looking for a solution, I resolved this by adding the following to my style.css. Note bootstrap.css has the z-index at 1040 /* Bootstrap 4 Beta Overrides */ .modal-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 2 !important; background-color: #000; }richp pro commented 7 years ago
HI MDB Team, I just tested my site with Firefox 55.0.2 (64-bit). Firefox does not respect the new Z index that I set in the above css. What is the prefered method to place the modal backdrop behind the modal? At current the backdrop is covering modal which prevents visitors from selecting any values in it or closing it. Thanks in advance for you help.Mirosław Stasiak free commented 7 years ago
Can you send me your all code to my email m.stasiak@mdbootstrap.com I tested modal with Firefox 55.0.2, MDB 4.4.1, Bootstrap v4.0.0-beta and everything was ok.ffdev free commented 6 years ago
@richp Thank you for your tips, it works wonder.