-
Notifications
You must be signed in to change notification settings - Fork 61
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
d3-drag doesn't work in Chrome's mobile test mode #41
Comments
The problem with the mobile device emulator is that it doesn’t pass our test for touch support: Lines 21 to 23 in 44af703
It seems that if you enable the device emulator and then reload, the top-level window does pass: Curiously enough, you also can’t assign a touch event listener using element.ontouchstart in the device emulator. You can however use element.addEventListener for touchstart events! So, I consider this a bug in Chrome’s device emulator. If it’s not possible to detect whether touch may be possible, then we’d have to go back to always registering touch event listeners, which would then cause a passive event listener warning. |
OK. It's probably linked to the fact that touch events are still in level 2. Since it's still a bit problematic, may I propose to add an option to allow overriding the autodetection ? See pull request #42 . I tested it in my project and it seems to work perfectly when enabling the touch events in Chrome. |
Released drag.touchable in 1.2.0. Thanks! |
I'm using Chrome 60.
To reproduce open the developers tools (Menu -> More Tools -> Developper Tools) then "Toggle device toolbar", then choose a device (as example: Ipad). Then open any examples for d3 drag (like this one).
It simply doesn't work anymore. As far as I can read d3 should support touch events, which Chrome is using to emulate its mobile test mode.
The text was updated successfully, but these errors were encountered: