theKashey / react-scroll-locky

📜🔒 – React full-cream "anti-scroll" library, you were looking for
57 stars 2 forks source link

Ignored attempt to cancel a touchmove event when isolation is false #3

Open yossisp opened 4 years ago

yossisp commented 4 years ago

I'm using the library with a mobile menu like this:

import { ScrollLocky } from 'react-scroll-locky';
import MotionDrawer from 'react-motion-drawer';
<MotionWrapper>
    <ScrollLocky enabled={isMobileMenuOpen} isolation={false}>
      <MotionDrawer
        open={isMobileMenuOpen}
        width="100%"
        zIndex={10}
        className="motionDrawer"
        onChange={handleChange}
      >
        // content
      </MotionDrawer>
    </ScrollLocky>
</MotionWrapper>

The problem is that above the mobile menu I have a button which closes the menu (x sign). Therefore I need to use isolation={false} in order to enable onClick events. Everything works but I get the error in Chrome console:

[Intervention] Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.
  | preventAll | @ | utils.js:2
-- | -- | -- | --
  | handleScroll | @ | handleScroll.js:51
  | (anonymous) | @ | index.js:47

Is there anything I can do about it?

theKashey commented 4 years ago

see https://github.com/theKashey/react-remove-scroll/issues/8

it's more about finding a proper way to handle situations like this.