kudago / waterfall

Waterfall layout. Extremely fast lightweight version of fluid columns masonry layout of isotope.
http://kudago.github.io/waterfall/
287 stars 67 forks source link

document.defaultView.getComputedStyle is null #9

Open tmlee opened 10 years ago

tmlee commented 10 years ago

Probably not specific to this plugin, is anyone getting a null returned from calling document.defaultView.getComputedStyle? https://github.com/dfcreative/jquery.waterfall/blob/master/jquery.waterfall.js#L572

It happens when i am running a Jasmine test.

Hacky but not sure if its right to wrap it with a conditional.. if(style != null)?

zandergrin commented 9 years ago

I get an error

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

https://github.com/kudago/waterfall/blob/master/jquery.waterfall.js#L564

kosso commented 9 years ago

me too.

ckollars commented 8 years ago

I'm getting the same error.

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

https://github.com/kudago/waterfall/blob/master/jquery.waterfall.js#L960

ckollars commented 8 years ago

I figured out my error issue

My theme file had my concatenated script loading in the head along with jQuery. Once I moved the files to the footer there was no error. I assume it's because the scripts were blocking the DOM from finish loading so once the scripts fired there wasn't a body tag that https://github.com/kudago/waterfall/blob/master/jquery.waterfall.js#L960 was referencing since the DOM was still loading.