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, console error

stefanvd priority asked 1 year 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 1 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 1 year ago

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


Kamila Pieńkowska staff answered 1 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.



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 4.3.0
  • Device: pc
  • Browser: Chrome, Safari
  • OS: Windows
  • Provided sample code: No
  • Provided link: No
Tags