scroll/touch events now passive
This commit is contained in:
parent
b64866206d
commit
00d680b441
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue