Materialize: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'

Created on 25 Sep 2018  Â·  4Comments  Â·  Source: Dogfalo/materialize

Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'

if (isString(prop)) {
        prop = getPrefixedProp(prop);
        return arguments.length > 1 ? this.each(function (v) {
          return v.style[prop] = value;
        }) : win.getComputedStyle(this[0])[prop];
      }

this is the code of materialize js -- 505 line.

When i am going to call $('.sidenav').sidenav();
then wen i am moving another pages by click menu it show this error on console but another everything is work fine. without this error

VM1414 materialize.js:505 Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.

Most helpful comment

Did you used collapsible in side menu? if yes then you can check that collapsible must have collapsible body to open, if it doesn't find any collapsible body then it throw error, kindly put blank div with collapsible-body class and check.

i have the same error and it got solved by doing this.

All 4 comments

Did you used collapsible in side menu? if yes then you can check that collapsible must have collapsible body to open, if it doesn't find any collapsible body then it throw error, kindly put blank div with collapsible-body class and check.

i have the same error and it got solved by doing this.

Did you used collapsible in side menu? if yes then you can check that collapsible must have the collapsible body to open, if it doesn't find any collapsible body then it throws an error, kindly put blank div with collapsible-body class and check.

I have the same error and it got solved by doing this.

Thank you @wrappixel for the solution. I really worked for me

Hi,

Can you please let me know for which template you are talking about?

Thanks

On Thu, Apr 30, 2020 at 2:13 PM Abhishek Pakhare notifications@github.com
wrote:

Did you used collapsible in side menu? if yes then you can check that
collapsible must have the collapsible body to open, if it doesn't find any
collapsible body then it throws an error, kindly put blank div with
collapsible-body class and check.

I have the same error and it got solved by doing this.

Thank you @wrappixel https://github.com/wrappixel for the solution. I
really worked for me

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Dogfalo/materialize/issues/6139#issuecomment-621699029,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGRZLTSVVCS7YA6RAPGAPATRPE23BANCNFSM4FXFIUNA
.

https://github.com/Dogfalo/materialize/issues/6139#issuecomment-425710936
@wrappixel the solution you have given for issue #6139 for adding a collapsible body div worked for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ruslandzhumaev picture ruslandzhumaev  Â·  3Comments

artur99 picture artur99  Â·  3Comments

cope picture cope  Â·  3Comments

Robouste picture Robouste  Â·  3Comments

MickaelH974 picture MickaelH974  Â·  3Comments