swiper icon indicating copy to clipboard operation
swiper copied to clipboard

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

Open broox opened this issue 2 years ago • 3 comments

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 avatar Feb 10 '24 21:02 broox

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

m345054 avatar Jul 21 '24 22:07 m345054

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

broox avatar Nov 14 '24 02:11 broox

FWIW - the toggle option seems to work with the master version of swiper that I'm running now 11.1.14 and the latest chrome on iOS. Tested in both mobile chrome and safari on iOS. This may not be necessary anymore, but I think it makes more sense for click events to live in the onClick handler.

broox avatar Dec 15 '24 19:12 broox