Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pinch does not work on latest version 3.6.1 #506

Open
ifancyabroad opened this issue Sep 17, 2024 · 7 comments
Open

Pinch does not work on latest version 3.6.1 #506

ifancyabroad opened this issue Sep 17, 2024 · 7 comments

Comments

@ifancyabroad
Copy link

ifancyabroad commented Sep 17, 2024

Describe the bug
Pinch functionality does not seem to work at all on version 3.6.2, the entire page is zoomed instead of the element. When downgrading to version 3.5.1 it seems to work as expected.

To reproduce
Steps to reproduce the behavior:

  1. Go to https://x8ynsx.csb.app/ on a mobile device (code is here)
  2. Attempt to use pinch gestures
  3. Notice the entire page is zoomed instead of the transform component

Expected behavior
The zoom effect should only be applied to the transform component, not the entire page.

Smartphone (please complete the following information):

  • Device: Samsung Galaxy A41
  • OS: Android 12
  • Browser: Chrome
  • Version: 128.0.6613.146

Additional context
This issue does not seem to exist on older versions.

@akunkel
Copy link

akunkel commented Oct 1, 2024

I fought with this a lot and found that the pinch gesture is being interpreted as a pan gesture. It only detects the pinch if I start panning first with one finger and then put down the other finger afterwards.

Downgrading to 3.5.1 did fix it for me as well.

@mjurkowski
Copy link

I have the same issue: downgrade to 3.6.0 helps. This PR make this issue happened https://github.com/BetterTyped/react-zoom-pan-pinch/pull/484/files

@HonzaKopecky
Copy link

I have the same issue: downgrade to 3.6.0 helps. This PR make this issue happened https://github.com/BetterTyped/react-zoom-pan-pinch/pull/484/files

Same here.

@tripleM-2005
Copy link

madare hamatono gaiidam 🙌❤

@blueset
Copy link

blueset commented Dec 4, 2024

I have the same issue: downgrade to 3.6.0 helps. This PR make this issue happened https://github.com/BetterTyped/react-zoom-pan-pinch/pull/484/files

Can confirm that this is the issue. Two tap events happens consecutively when a pinch gesture happens, and the second one triggers the isDoubleTap condition that prevents zoom from happening.

@Peracek
Copy link

Peracek commented Jan 2, 2025

What is really confusing is that the demo storybook obviously doesn't use this 3.6.1 version. The storybook version worked on my phone and my app didn't. So I spent hours debugging thinking it must be an issue of my app.

@Neiz-Kap
Copy link

Neiz-Kap commented Jan 4, 2025

For anyone, who couldn't resolve it by switching to another versions, take a look at your index.html file, because it can be an additional reason of not working pinch

-  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
+ <meta name="viewport" content="width=device-width, user-scalable=no">

Or play with maximum-scale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants