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

Pointer movement shouldn't prevent clicks until a minimum threshold of movement #2125

Open
noisefloordev opened this issue Oct 4, 2024 · 2 comments

Comments

@noisefloordev
Copy link

onPointerMove sets this.isDragging, which prevents a tap after a drag. However, there's no thresholding, so any pointer movement at all prevents a click. This causes lots of clicks to be lost. Modern mice are extremely sensitive, and I often have to click 3-4 times before PhotoSwipe will recognize a click. It keeps seeing miniscule pointer movements between the press and release as my finger press causes the mouse to move slightly.

Normal browser click events do this thresholding automatically, but PhotoSwipe is using pointer events instead, so it doesn't take advantage of that. This makes PhotoSwipe really frustrating to use as I have to click over and over to zoom in and out. This may not have been a problem when this code was originally written (it looks like this project has been around for a long while!), but modern laser mice are precise to a fault.

@dimsemenov
Copy link
Owner

That's an interesting issue, I'll look into that. What exactly mouse are you using? Or is it some kind of software for it?

@noisefloordev
Copy link
Author

It's the Razer Basilisk V3, on a QcK mousepad.

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