mirror of
https://github.com/KevinMidboe/leifsopplevelser.git
synced 2025-10-29 09:40:21 +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() {
|
created() {
|
||||||
window.addEventListener('keyup', this.arrowNavigation)
|
window.addEventListener('keyup', this.arrowNavigation)
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
document.ontouchmove = function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
window.removeEventListener('keyup')
|
||||||
|
document.ontouchmove = function (e) {
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
hidePopover: () => store.dispatch('hidePopover'),
|
hidePopover: () => store.dispatch('hidePopover'),
|
||||||
forwards: () => store.dispatch('incrementPopoverImage'),
|
forwards: () => store.dispatch('incrementPopoverImage'),
|
||||||
@@ -44,9 +55,6 @@ export default {
|
|||||||
this.hidePopover()
|
this.hidePopover()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
|
||||||
window.removeEventListener('keyup')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user