goncy / react-swipy

A simple Tinder-like swipeable React component
MIT License
27 stars 19 forks source link

React-Swipy on Mobile creates a vertical scroll on the whole page #3

Closed sharad-s closed 5 years ago

sharad-s commented 5 years ago

Reopening #2 - Still can't figure out why react-swipy works fine on desktop, however on Mobile it will create an awkward vertical scroll on the page.

Examples (Open these on a mobile phone and on desktop to see issue replicated):

  1. https://5x53pnrn3x.codesandbox.io/ (@goncy 's example implementation)
  2. https://plug.af/75ca67 (my Implementation)

@goncy last mentioned "lock this behaviour disabling the overflows on the container or removing it's pointer events i guess" but I am unable to figure out how this helps

goncy commented 5 years ago

add overflow:hidden to the div with class card-container-god and the one with id of SWIPEABLE

sharad-s commented 5 years ago

@goncy I tried these changes and it didn't solve the issue. You can see that the issue persists even on the implementation you provided. take note this is a mobile-specific issue.

I plan to fork the repo to fix this issue, but I would love to have a brief chat with you when you are free to discuss if possible.

thank you!

sharad-s commented 5 years ago

This might be a reference to the issue at hand : https://stackoverflow.com/questions/16348031/disable-scrolling-when-touch-moving-certain-element