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 when swiping

See original GitHub issue

I’m using the vue2-touch-events plugin to create some “native like” swiping behaviour for a Nuxt JS hybrid app built with Cordova. I’ve implemented an element (positioned absolutely) over the majority of the screen that once swiped on the $router pushes to a new page.

This has been working fine up until recently where I have noticed an error being fired in my console:

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

I’m not too sure why I’m experiencing this error, and have attempted to revert some things which has made no difference. The code in question is attached:

HTML Vue JS markup

<span
  v-touch:swipe.right="swipePrevPage"
  v-touch:swipe.left="swipeNextPage"
  class="page-swipe-trigger">
</span>

Implemented methods

/**
 * Handle page swipe (next page)
 */
swipePrevPage() {
  if (this.page && this.id && this.$refs.hasPages[0].innerText === 'true') {
    if (this.prevPage != -1) {
      this.$router.push('/url/' + this.page + '/' + this.prevPage)
    } else {
      this.$router.push('/url/' + this.page)
    }
  }
},


/**
 * Handle page swipe (next page)
 */
swipeNextPage() {
  if (this.page && this.id && this.$refs.hasPages[0].innerText === 'true') {
    if (this.nextPage < parseInt(this.$refs.getPages[0].innerText)) {
      this.$router.push('/url/' + this.page + '/' + this.nextPage)
    }
  }
}

For refernece, I’m using version 2.3.0 of the plugin, and have it configured like this…

import Vue from 'vue'
import Vue2TouchEvents from 'vue2-touch-events'

Vue.use(Vue2TouchEvents, {
  touchClass: 'touched',
  swipeTolerance: 50
})

If someone could help me with why I’m experiencing this error, the error shows up when trying to swipe.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jerrybendycommented, Jan 20, 2021

@ErickPetru I have made this change on v3.1.1, you can try this.

0reactions
ErickPetrucommented, Jan 20, 2021

Nice @jerrybendy, no console error logged anymore.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Easy fix for: '[Intervention] Ignored attempt to cancel ... - URIports
Ignored attempt to cancel a touchmove event with cancelable=false - so your browser has ignored the request to cancel an event called touchmove ......
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 >
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 touchmove event when ...
I'm using the vue2-touch-events plugin to create some "native like" swiping behaviour for a Nuxt JS hybrid app built with Cordova.
Read more >
三种方法解决[Intervention] Ignored attempt to cancel a ...
[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