-
Notifications
You must be signed in to change notification settings - Fork 24
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
setPointerCapture() disables click events in Chrome #4
Comments
Interesting! I think I currently assume that you're preventing default if you're returning true from the start callback, but I realise this isn't enforced. A reduced test case would certainly help! |
I actually do return Inside the pinchable element is an SVG (rendered by React) with (By the way, I'm a big fan of HTTP 203. Keep up the amazing work!) |
Are you calling |
Yes, just like Squoosh. |
If you're saying |
I think the fix will be to change: this._element.setPointerCapture(event.pointerId); To event.target.setPointerCapture(event.pointerId); Can you try that for me? |
That works! Thank you so much. Should I open a PR? |
Yes please! |
How should I handle the case where |
Just to be safe: (event.target || this._element).setPointerCapture(event.pointerId); |
Prefer event target over element when calling setPointerCapture() (fixes #4)
This line disables all click events inside the element, but only in Chrome.
I'm really sorry this is such a short ticket but I don't really have the time to create a reproducable case right now because my case is pretty involved, but I wanted to bring it up anyway. Please let me know if you need any additional information.
The text was updated successfully, but these errors were encountered: