jsnanigans / vue-parallax-js

Tiny vue component that adds a directive for parallax effect on elements.
121 stars 19 forks source link

Bug: type error on window resize #17

Closed 40818419 closed 5 years ago

40818419 commented 6 years ago
bildschirmfoto 2018-07-12 um 21 01 00
alijaya commented 6 years ago

I think it's caused by offsetParent being null See here

I think it would be better if the code handles when offsetParent is null

jsnanigans commented 6 years ago

it could be that @alijaya but it could also be that the element is removed (maybe with a v-if) but the plugin still tries to animate it but the node does not exists anymore.

@40818419 are you using a v-if in your code?

40818419 commented 6 years ago

i'll investigate, but here is how i use it: https://github.com/sourcestream/sourcestream.de/blob/master/src/app/contentful/Hero/Hero.vue