marcbruederlin/particles.js

Chrome and Safari Issues

diego-castillo opened this issue · 4 comments

Hi Marc! Thanks for the amazing plugin. In Chrome and Safari I get this error message in console, but in Firefox works fine.

TypeError: null is not an object (evaluating 'o.element.offsetParent.clientWidth')

I followed your example codes but I can't make it work.
I'm using Wordpress and Jquery

Similar issue here:

Uncaught TypeError: Cannot read property 'clientWidth' of null
    at Object.n._initializeCanvas (particles.min.js:9)
    at Object.init (particles.min.js:9)
    at <anonymous>:1:11

Which Chrome/Safari version do you use?

Chrome 68.0.3440.75

The issue happens when the <canvas> has position: fixed or anything else that would make offsetParent undefined.

https://stackoverflow.com/questions/306305/what-would-make-offsetparent-null#11639664