-
-
Notifications
You must be signed in to change notification settings - Fork 105
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
TweakPane Sliders do not respond to touch drag events #317
Comments
It's not intentional behavior. Works fine on iOS and Android, but I don't have that device so I cannot test with it.
|
Yes, I have tested on android and touch events on tweakpane are working like charm ! https://maheshkurmi.github.io/experiments/micrometer On mobile devices both hammer.js and tweakpane.js work fine simultaneously, so I do not think that there is some conflict due to hammer.js. |
I am on windows 10 Home version 2004 |
Does the slider in |
No, the event is fired only on touchdown not on touchmove/touchdrag |
touchdrag event is not firing for tweakpane on other touch windows devices also. I have checked on lenovo touch device also |
Could you test this sketch?
|
Although supportsTouch results false, it responds to all events touchstart, touchmove and touchup supportsTouch: false |
problem demonstrations video recorded on surface |
Actually while Note 1: out of above conditions only
Touch drag starts working on my surface (haven't checked on android device yet) But above resulted in weird situation, |
Thank you for detailed information! It seems that touch event handling works properly but touch devices detection doesn't work. I updated
It may be caused by |
Support touch is returning true, touch events are working fine on my device, but mouse Events are not working now, sliders or color controls can't be dragged using mouse or touchpad. To check, I replaced
Is changing anything else is also needed to get mouse events working? |
Ah okay, we have to support both mouse and touch input at the same time. The current implementation disables mouse input when a touch device is detected to avoid unexpected conflicts, but it should be removed...? 🤔 Does removing lines as below (line 2002–2009 in tweakpane-3.0.0.js) solve the problem? - if (supportsTouch(doc)) {
element.addEventListener('touchstart', this.onTouchStart_);
element.addEventListener('touchmove', this.onTouchMove_);
element.addEventListener('touchend', this.onTouchEnd_);
- }
- else {
element.addEventListener('mousedown', this.onMouseDown_);
- } |
On removing lines you mentioned, Its Working !!! Can it have some side-effect/conflict.
Thanks a lot ! really teakpane is best UI library I came across, helping me to create interactive simulations without bothering UI on platform. |
Fixed in 3.0.1. Thank you for your help! |
Tweakpane ui works fine on touch devices expect that it doesn't respond to touch drag event. In case of slider and color control ui responds to touch down and touch up event but does nothing on drag (with mouse it works fine).
Is it intentional?
FYI dat gui is working good with touch devices.
I am testing on microsoft surface pro 6
The text was updated successfully, but these errors were encountered: