-
Notifications
You must be signed in to change notification settings - Fork 54
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
When oneFingerPan is true clicks on SVG elements are not working anymore #93
Comments
Mh, this is not that easy to solve. Some people want to be able to pan even if you "start" the pan on an element. You however dont want panning on elements. I am not really sure how to satisfy both |
I guess the only way is a sort of timeout handling and move difference between mouseDown and mouseUp event. What do you think? |
That will complicate the code quite a bit and timeouts are really sensitive to race conditions and stuff not behaving the same all the time. Thats why I avoid them. btw: what mouse events exactly are not working for elements anymore? Afaik, we don't stop Propagation and only prevent default for touch down |
Seems to be blocked globally, I could prepare a simple repo to play with.....what do you think? |
sure there is no harm in playing around and finding better solutions |
Here a simple stackblitz with Please use a touch screen or a device to test click. As you could see there is no way to make click works on the top black dot. |
Works for me when doing this: SVG('#pointB').on('click', () => {
console.log('test');
}); |
Thanks @Fuzzyma for your time but when I try your sample on my touch screen I have the same issue. Did you try on a touch device? if yes on a desktop touch display or mobile one? |
No. I only tried on my laptop. You can try touchstart as well tho. Sorry, I cant spend much time to figure this out atm. |
@meriturva got the same issue. found any solution for this? |
No actually |
Have the same issue is there a proper solution for this? |
Would be nice if a threshold could be configured. Something like "if I drag my finger for 5px, then it starts to pan, otherwise it's a click". |
is it possible to enable
oneFingerPan
and still receive mouse events from SVG elements?Thanks
The text was updated successfully, but these errors were encountered: