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

Pinch to zoom gesture blocked on iPhone

Open mi-na-bot opened this issue 1 year ago • 1 comments

Bugs and Questions

Describe Your Environment

  • What version of nuka-carousel are you using?
  • What version of React are you using?
  • What browser are you using?

"react": "18.2.0", "nuka-carousel": "^6.0.3",

The browser is the most recent stable version of iOS Safari.

Describe the Problem

The drag handling prevents pinch to zoom gesture. This usually occurs when a touch event handler only worries about the first element of the touches[] array, instead of making sure there is only one element.

Expected behavior:

On mobile browsers it should be possible for people to quickly zoom in and back out on the carousel images. Multi touches should probably be ignored by the library.

Actual behavior

Multi finger touches act like a single finger touch.

Additional Information

mi-na-bot avatar May 14 '23 08:05 mi-na-bot

I would be interested in working on a PR for this, as long as allowing pinch to zoom would be considered desirable behavior.

mi-na-bot avatar May 14 '23 08:05 mi-na-bot