pigallery2 icon indicating copy to clipboard operation
pigallery2 copied to clipboard

lightbox: fix iOS click/tap issues

Open BluSyn opened this issue 2 years ago • 5 comments

Fixes #493

Very difficult to use iPad with pigallery2 due to this bug. I was able to track the cause down to JS click event not firing properly while in lightbox. Instead, tap event seems to work in this case, as it better handles mobile touch interactions.

The exact cause is hard to debug, as I can sometimes get click to work on iPad Safari, but it's very inconsistent.

Downside, this requires duplicating (click) and (tap) for all interactions here, but this for sure fixes the issue without causing any noticeable problems for existing desktop browsers.

There is probably a less clunky way to solve this. This was the quick and dirty fix.

BluSyn avatar Aug 08 '22 03:08 BluSyn

Same is happening here on iPhone. The pr visibly looks suitable but I don’t have anything but the pi to build it on atm.

HuwSy avatar Aug 14 '22 02:08 HuwSy

Built here and noticed an issue. New line 115 has tap zoom out but should be tap zoom in.

HuwSy avatar Aug 16 '22 07:08 HuwSy

Thank you for your PR. I do not have any better solution for this for now.

Can you fix the zoom issue on line 115?

bpatrik avatar Aug 20 '22 20:08 bpatrik

Hi @BluSyn, any chance you could fix that PR so that @bpatrik can merge that? The iOS users in my household would be very grateful ;) Thanks!

GreenTeaBalls avatar Sep 18 '22 09:09 GreenTeaBalls

@bpatrik I added the zoomin fix

However, I realized my fix causes issues on desktop browsers. Now if you click "next" in Chrome, it reacts to both "click" and "tap" events, resulting in skipping 2 images.

I will look into a better solution that fixes iOS without regressions.

BluSyn avatar Sep 19 '22 09:09 BluSyn

Thank you!

bpatrik avatar Sep 25 '22 21:09 bpatrik

Hey @BluSyn any news on this one? This problem effectively breaks pigallery2 for iOS users I guess 😢 it would be really great this got fixed.

GreenTeaBalls avatar Oct 30 '22 19:10 GreenTeaBalls

where can I get version 1.9.4 for docker? The demopage is that version and this issue seems to be fixed there.

Byggerat avatar Nov 16 '22 08:11 Byggerat

https://github.com/bpatrik/pigallery2/commit/48a1900fc668ea3d7a6c513cc1e100e4059014d5 fixed this.

bpatrik avatar Dec 18 '22 09:12 bpatrik