Topic: Modal error permanent fix
Expected behavior When a HTML element with data-mdb-toggle="modal" is clicked, it should open the target modal without having to add pe-none class to a child element.
Actual behavior I see many topics over the years that opening a modal throws the following error:
Uncaught TypeError: Cannot read properties of undefined (reading 'backdrop')
The workaround that is given is to add pe-none class to the child element. This workaround work, but this isnt just a problem for the element. It is basically for any child element that has data-mdb-toggle="modal" attribute.
Having to add a workaround pe-none to the child element is easy to forget.
Besides, I wonder why this is only an issue for MDBootstrap and not Bootstrap, assuming MDbootstrap is a fork of Bootstrap.
Is there any plan on fixing this?
mlazaru staff answered 2 years ago
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: Yes
- Technology: MDB Standard
- MDB Version: MDB5 6.4.0
- Device: Desktop
- Browser: Chrome, Firefox
- OS: Windows 11
- Provided sample code: No
- Provided link: No