materialize icon indicating copy to clipboard operation
materialize copied to clipboard

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

Open ashikjs opened this issue 6 years ago • 5 comments

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'.

ashikjs avatar Sep 25 '18 19:09 ashikjs

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.

wrappixel avatar Sep 30 '18 10:09 wrappixel

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

AbhiPakhare avatar Apr 30 '20 08:04 AbhiPakhare

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 [email protected] 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 .

wrappixel avatar May 01 '20 04:05 wrappixel

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.

AbhiPakhare avatar May 02 '20 09:05 AbhiPakhare

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.

thanks was stuck for hours on this

cristoferrao avatar Jul 12 '21 11:07 cristoferrao