Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Modal error permanent fix

dbsgroep priority asked 1 year 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?


Mateusz Lazaru staff answered 1 year ago


You are right, I will add a task to find a solution for this issue.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: 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