Topic: Modal, console error
I added the simplest Modal, the first one on the component page. Didn't change anything.
Expected behavior When clicking the modal button, no errors in the console.
Actual behavior Modal works fine, however the below error in the console.
Resources (screenshots, code snippets etc.) modal.js:158 Uncaught TypeError: Cannot read properties of undefined (reading 'backdrop') at mx._initializeBackDrop (modal.js:158:39) at new K0 (modal.js:69:27) at new mx (modal.js:83:5) at HTMLButtonElement. (modal.js:401:12) at HTMLDocument.i (event-handler.js:119:21)
Kamila Pieńkowska staff answered a year ago
This bug does not occur in the snippet: https://mdbootstrap.com/snippets/standard/kpienkowska/5592457
Please try to recreate your problem in the snippet.
stefanvd pro premium priority answered a year ago
Hi Kamila,
Yes... I already noticed that, because I tried to solve the issue before, with a snippet. "Problem" with the snippets, for me, is that I can use them to check HTML and CSS - but I can't see what is going wrong in the JS on my side. JS tab is empty in the snippet.
Or do I miss something?
With kind regards, Stefan
Kamila Pieńkowska staff commented a year ago
JS tab is empty because you do not need any JS to run the basic modal.
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 4.3.0
- Device: pc
- Browser: Chrome, Safari
- OS: Windows
- Provided sample code: No
- Provided link: No