Topic: Modal error permanent fix
dbsgroep priority asked 8 months ago
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?
You are right, I will add a task to find a solution for this issue.
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- User: Priority
- 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