react-remove-scroll: Ignored attempt to cancel a touchmove event with cancelable=false

hello, I see the error

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

in the console when I use touch events on the scrollable area.

This issue happens because https://github.com/theKashey/react-remove-scroll/blob/master/src/component.tsx#L101 can’t be canceled!

A possible solution is described here

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 3
  • Comments: 15 (5 by maintainers)

Commits related to this issue

Most upvoted comments

Hello! I am running into similar errors in my DataDog real user monitoring. The error is:

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

Seems to be coming from react-remove-scroll/dist/es2015/SideEffect.js at line 89.

 if (sourceEvent && sourceEvent.should) {
            event.preventDefault();
            return;
        }

should we add a check here as well with event. cancelable ?

Still occurs. Is there any resolution on this?

UPDATE: I actually figured out when it happens exactly. If I scrolled all the way down and released my finger from the screen and try to scroll down more - it’s not showing any errors/warnings. But if I drag my finger up or down the screen and reach the end of the scrollable area, but continue the dragging - only then it shows this error in the console.

I’m getting this same error when I have a dialog with horizontally scrollable element in it. The element seems to work fine on my Android phone but the console is filled with error on Chrome simulator.

Is there anything I could do on my app’s side to avoid this or should I just shrug it off? I’m using this library as a dependency of reach ui’s dialog component: https://github.com/reach/reach-ui

What is the latest on this?

I saw many warning around canceling touch/scroll events, which are cancelable, but canceling them would lead to a bad used experience, bla, bla, bla. But that’s what we are doing here 😃