Open blaaat opened 3 years ago
Hello, @blaaat were you able to solve this? I ran into the same issue
Hello, @blaaat were you able to solve this? I ran into the same issue
No, you?
Edit:
This is how to reproduce:
@lucaspulliese maybe remove eventlistener in beforeDestroy as well?
@blaaat It's because when you close the modal ( withouth using the X button ) the event window.removeEventListener('resize', this.xPositionOnResize) is not used. To solve this problem, it's necessary to call that removeEventListener when the modal is closed, in every way possible. Or call that function inside the beforeDestroy as you said, but it's necessary export that methods from the plugin
if still relevant
beforeDestroy () {
window.removeEventListener('resize', this.$refs.CoolLightBox.xPositionOnResize);
},
I haven't been able to reproduce this, but my Bugsnag is full of this error. It appears to trigger twice when it triggers.
Triggered in:
TypeError Cannot read property 'clientWidth' of undefined node_modules/vue-cool-lightbox/dist/vue-cool-lightbox.esm.js:1296:24 f.setLightboxInnerWidth node_modules/vue-cool-lightbox/dist/vue-cool-lightbox.esm.js:1302:11 f.xPositionOnResize
Only happens in mobile browsers.