Topic: Modal, console error

stefanvd priority asked 9 months ago

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)

stefanvd priority answered 9 months 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 9 months ago

JS tab is empty because you do not need any JS to run the basic modal.

Kamila Pieńkowska staff answered 9 months ago

This bug does not occur in the snippet:

Please try to recreate your problem in the snippet.

Please insert min. 20 characters.


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



Specification of the issue

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