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

Enable image viewer long-press context menu on iOS Safari #1748

Closed
jkgeyti opened this issue Apr 28, 2021 · 2 comments
Closed

Enable image viewer long-press context menu on iOS Safari #1748

jkgeyti opened this issue Apr 28, 2021 · 2 comments

Comments

@jkgeyti
Copy link

jkgeyti commented Apr 28, 2021

On desktop browsers, you can right click images to get a context menu that includes a "Copy image" context menu, but on iOS Safari, long-clicking to show the long-press context menu is disabled because -webkit-touch-callout: none is set.

As a quick hack, adding the following css and long-clicking images produces the context menu shown in the screenshot below. I'm not sure if there's any good justification for disabling the context menu on mobile devices, but if not, it'd be really convenient if it could be enabled 🙏 . There's an old ticket from 2011 that makes a similar request, but touch events didn't seem to be broken by re-enabling long-click support, so maybe things have improved since then, and the feature can be reconsidered?

.pswp__img {
    -webkit-touch-callout: default !important;
}

Related:
#99
photoprism/photoprism#1233

@dimsemenov
Copy link
Owner

It should be fixed in v5 version, please test and report back if you'll have a minute. #1749

@jkgeyti
Copy link
Author

jkgeyti commented Apr 29, 2021

I can confirm that long-pressing works in iOS Safari on the sample galleries at https://photoswipe.com/v5/docs/getting-started 🎉

Closing issue and eagerly awaiting a release 👍

@jkgeyti jkgeyti closed this as completed Apr 29, 2021
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

2 participants