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

Previews: Add touch gesture support #837

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

Conversation

mjpieters
Copy link

On devices with touch support, maps left and right swipes to moving to
the next and previous item, and double-taps to toggling fullscreen on
and off.

Fixes #713

@mjpieters
Copy link
Author

mjpieters commented May 22, 2022

I've tested this on Safari on an iPhone 8 plus (iOS 15) and by using the mobile device emulation modes on Firefox and Chrome.

For videos, if not in full screen and not playing, swiping works fine, so you can use this to switch between videos too. Once playing the native video player is in control and touch events don't reach JavaScript. To me, this feels very natural.

I haven't really tested this yet with text or audio content.

On devices with touch support, maps left and right swipes to moving to
the next and previous item, and double-taps to toggling fullscreen on
and off.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants