Topic: Sidenav has error : Cannot read property 'parentNode' of null

elmajed2007 free asked 3 years ago

Console error on sidenav Cannot read property 'parentNode' of null

Marcin Luczak staff answered 3 years ago


You have added option data-mdb-scroll-container="#scrollContainer" which points to the #scrollContainer element that is not present in your HTML. Removing this option, or adding this element as a wrapper for the sidenav will fix your console.error.

Also, please create your MDB5 related questions in the MDB5 section. This section is for jQuery technology-related questions only.

Keep coding,


elmajed2007 free commented 3 years ago

Thank you, it is working

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: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.19.2
  • Device: computer
  • Browser: crome
  • OS: windows 10
  • Provided sample code: No
  • Provided link: Yes