mirror of
https://github.com/KevinMidboe/leifsopplevelser.git
synced 2025-10-29 01:30:22 +00:00
Now beforeDestroy is actually called as a vue api event and added a lock for scrolling on ios when the component is mounted.
This commit is contained in:
@@ -30,6 +30,17 @@ export default {
|
||||
created() {
|
||||
window.addEventListener('keyup', this.arrowNavigation)
|
||||
},
|
||||
mounted() {
|
||||
document.ontouchmove = function (e) {
|
||||
e.preventDefault();
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('keyup')
|
||||
document.ontouchmove = function (e) {
|
||||
return true;
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
hidePopover: () => store.dispatch('hidePopover'),
|
||||
forwards: () => store.dispatch('incrementPopoverImage'),
|
||||
@@ -44,9 +55,6 @@ export default {
|
||||
this.hidePopover()
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('keyup')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user