question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Intervention] Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.

See original GitHub issue

[Intervention] Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.

Vue.js version and component version

  • vue-cli 3.0.1
  • vue 2.5.17
  • vue-awesome-swiper 3.1.3

Steps to reproduce

Global registration
import VueAwesomeSwiper from 'vue-awesome-swiper'

// require styles
import 'swiper/dist/css/swiper.css'

Vue.use(VueAwesomeSwiper, /* { default global options } */)
Component code
<!-- The ref attr used to find the swiper instance -->
<template>
  <swiper :options="swiperOption" ref="mySwiper">
    <!-- slides -->
    <swiper-slide>I'm Slide 1</swiper-slide>
    <swiper-slide>I'm Slide 2</swiper-slide>
    <swiper-slide>I'm Slide 3</swiper-slide>
    <swiper-slide>I'm Slide 4</swiper-slide>
    <swiper-slide>I'm Slide 5</swiper-slide>
    <swiper-slide>I'm Slide 6</swiper-slide>
    <swiper-slide>I'm Slide 7</swiper-slide>
  </swiper>
</template>

<script>
  export default {
    name: 'carrousel',
    data() {
      return {
        swiperOption: {
          // some swiper options/callbacks
          // 所有的参数同 swiper 官方 api 参数
          // ...
        }
      }
    },
    computed: {
      swiper() {
        return this.$refs.mySwiper.swiper
      }
    },
    mounted() {
      // current swiper instance
      // 然后你就可以使用当前上下文内的swiper对象去做你想做的事了
      console.log('this is current swiper instance object', this.swiper)
      this.swiper.slideTo(3, 1000, false)
    }
  }
</script>

It can still trigger a slide when it is about 5-10 pixels beneath the swiper component, and the following error is reported in the console

[Intervention] Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.

What is Expected?

He shouldn’t be executed when sliding a component, because the sliding is out of the scope of the component, and the swiper parent element can see overflow: hidden; when I’ve looked through a lot of data and couldn’t find the right answer, I think I should be here to find the answer

What is actually happening?

It may seem like an insignificant problem for a component, but it’s unusual for him to be able to slide underneath and out of the component so he can trigger the slide.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15

github_iconTop GitHub Comments

10reactions
xiaoxiongzicommented, Oct 24, 2018

给html元素添加一个css3属性

touch-action: none;

即可解决这个问题

8reactions
jocchoccommented, Mar 5, 2019

try to add attribute “ontouchstart” at the body tag. like this: mu ub b7g 1 ivbflz 8d

Read more comments on GitHub >

github_iconTop Results From Across the Web

Easy fix for: '[Intervention] Ignored attempt to cancel ... - URIports
[Intervention] Ignored attempt to cancel a touchstart event with cancelable=false, for example, because scrolling is in progress and cannot be ...
Read more >
Touch move getting stuck Ignored attempt to cancel a ...
Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.
Read more >
(Emitted error) Ignored attempt to cancel a touchmove event ...
(Emitted error) Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted #11961....
Read more >
Solving issue: “[Intervention] Ignored attempt to cancel a ...
Solving issue: “[Intervention] Ignored attempt to cancel a touchmove event with cancelable=false”. This article describes how to solve this warning that ...
Read more >
[Intervention] Ignored attempt to cancel a ... - AppStudio
“[Intervention] Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found