The main issue is that everything inside window.load only runs if the Product Zoomer is there in the beginning. So, it causes issues like the ones mentioned in #54 . If the ProductZoomer is rendered later in some conditional way, it will create issues.
Solution
Added this.$nextTick instead. This will make sure the styles are added everytime the component is mounted.
The issue with
window.load
The main issue is that everything inside
window.load
only runs if the Product Zoomer is there in the beginning. So, it causes issues like the ones mentioned in #54 . If the ProductZoomer is rendered later in some conditional way, it will create issues.Solution
Added
this.$nextTick
instead. This will make sure the styles are added everytime the component is mounted.