-
Notifications
You must be signed in to change notification settings - Fork 17
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
Glitchy zoom and pan on mobile devices #32
Comments
Even worse in iPhone devices. You will have to hijack the touch events: if (/iPad|iPhone|iPod/.test(navigator.userAgent)) {
window.addEventListener(
"touchstart",
ev => {
ev.preventDefault();
},
{ passive: false }
);
} |
The only issue is that it doesn't solve the issue. It just prevents scrolling the whole page! |
I mainly solved this by adding a class to the .panZoom,
.panZoom * {
touch-action: none;
} |
@davwheat since now I haven't focused that much on the mobile side of this library. What you are saying is relevant and will consider including it in a new version. |
You have to only apply it when scrolling is in progress (for iOS)... 🙂 |
Video attached.
Panning often scrolls up and down the page instead of panning.
Zooming is very laggy, random or doesn't work at all.
https://puu.sh/ED3Ps/d38a0c1a8d.mp4
The text was updated successfully, but these errors were encountered: