scroll/touch events now passive

This commit is contained in:
ManjaroOne666 2019-02-05 12:36:50 +00:00
parent b64866206d
commit 00d680b441
1 changed files with 4 additions and 4 deletions

View File

@ -117,11 +117,11 @@ export default {
mounted () { mounted () {
window.addEventListener('resize', this.handleResize) window.addEventListener('resize', this.handleResize)
this.$refs.galleryThumbsList.addEventListener('touchstart', this.handleTouch) this.$refs.galleryThumbsList.addEventListener('touchstart', this.handleTouch, { passive: true })
this.$refs.galleryThumbsList.addEventListener('touchend', this.handleTouch) this.$refs.galleryThumbsList.addEventListener('touchend', this.handleTouch, { passive: true })
this.$refs.galleryThumbsList.addEventListener('wheel', this.handleThumbsScroll) this.$refs.galleryThumbsList.addEventListener('wheel', this.handleThumbsScroll, { passive: true })
// firefox // firefox
this.$refs.galleryThumbsList.addEventListener('mousewheel', this.handleThumbsScroll) this.$refs.galleryThumbsList.addEventListener('mousewheel', this.handleThumbsScroll, { passive: true })
this.$nextTick(function () { this.$nextTick(function () {
this.updateElements() this.updateElements()
this.scrollToThumb(this.activeIndex) this.scrollToThumb(this.activeIndex)