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

Move click/tap events to onClick handler to fix bug with double tapping on mobile Chrome #7310

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

broox
Copy link
Contributor

@broox broox commented Feb 10, 2024

There was an issue in which double tap events were not being emitted on mobile Chrome.

On mobile Chrome, the second touch event was not being emitted appropriately, which resulted in touch times being much longer than 300ms.

The click event is being emitted on all browsers, as expected. This change moves tap/click events to the onClick handler, which I think makes more sense. This change fixes the bug for me.

Closes: #7309

@broox broox force-pushed the mobile-chrome-doubletap-fix branch 4 times, most recently from d6af877 to c0adeb0 Compare February 11, 2024 22:40
@m345054
Copy link

m345054 commented Jul 21, 2024

Why hasn't this been merged yet? Is there a workaround? @nolimits4web

@broox
Copy link
Contributor Author

broox commented Nov 14, 2024

hi @nolimits4web, do you have concerns with this implementation? anything i can do to help?

@broox broox force-pushed the mobile-chrome-doubletap-fix branch from c0adeb0 to 85059be Compare December 15, 2024 17:08
@broox
Copy link
Contributor Author

broox commented Dec 15, 2024

FWIW - this solution does not seem to work after rebasing the latest master. It is breaking the touch and drag events while trying to swipe between slides.

That said, it the toggle option seems to work with the version of swiper that I'm running now 11.1.14. Tested in both mobile chrome and safari on iOS. This may not be necessary anymore.

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

Successfully merging this pull request may close these issues.

Double tap to zoom does not reliably work on mobile
3 participants