nuka-carousel icon indicating copy to clipboard operation
nuka-carousel copied to clipboard

Scroll disabled with swiping === false

Open PeterKottas opened this issue 7 years ago • 5 comments

Describe Your Environment

  • What version of nuka-carousel are you using? 4.4.2
  • What version of React are you using? 16.6.1
  • What browser are you using? Chrome
  • What machine are you on? Windows

Describe the Problem

https://codesandbox.io/s/mjxwl64p2y Just add swiping={false} into carousel props Then use chrome dev tools to simulate a mobile device (CTRL + SHIFT + M)

Expected behavior: [What you expect to happen] I expect the touch swiping to be disabled, and to be able to scroll the window while touching (vertically) on the slide. Actual behavior: [What actually happens] Swiping indeed is disabled, but sometimes (in codesandbox sometimes, in my code always for some reason) if you scroll using touch, when you start the scroll inside the slide, it will not scroll. Therefore if your slide is full-screen (like mine is), it can easily happen that you get stuck with no option of scrolling out of the slide.

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

PeterKottas avatar Nov 11 '18 00:11 PeterKottas

For now, I've hacked around this using

.slider-frame{
  pointer-events: none;
}

Which obviously is far from ideal.

PeterKottas avatar Nov 11 '18 00:11 PeterKottas

I have seen this issue as well on mobile Chrome, although not on mobile Safari.

ScottSmith95 avatar Jan 25 '19 21:01 ScottSmith95

We are experiencing a similar issue on touch devices. Our carousel takes up 90% of the vertical height so users are unable to scroll the page. @PeterKottas's solution works but we agree that this is not ideal.

dsmikeyorke avatar Oct 23 '19 14:10 dsmikeyorke

Hi there! I also encountered this bug, switching off pointer-events on the slider is a good idea for most cases, but if you have interactive UI elements(especially with OnClick handlers) inside slider content it is not a good solution.

missilev avatar Oct 24 '19 10:10 missilev

The below solution is good until you have radio button inside the slide. with radio inside card will block radio selection.

.slider-frame{ pointer-events: none; }

mobcoder-kiran avatar Mar 26 '21 18:03 mobcoder-kiran

This appears to be working normally in v5.2.0

fritz-c avatar Aug 18 '22 18:08 fritz-c