Closed danielzgtg closed 1 year ago
Based on a quick grep over the firefox sourcecode, that property doesn't seem to be implemented for linux so it defaults to 0.
A possible solution could be to check for 'ontouchstart' in window
, this returns true on my surface and false on my desktop.
Ok, looked a bit deeper, it seems that ontouchstart
is a legacy API and firefox will hide it for every address other than chrome://browser/content/blanktab.html
.
You can manually enable it by setting dom.w3c_touch_events.legacy_apis.enabled
to true, but this actually doesn't do autodetection, it just unconditionally enables the properties as far as I can tell. But it should at least solve your issue with d3-zoom, since it already checks for ontouchstart
.
Thank you, setting dom.w3c_touch_events.legacy_apis.enabled = true
works. It fixed the problem for me.
I'm also thinking about the other users that will use d3-zoom websites. I don't know whether they will eventually find this information here. For my own websites, I tried window.ontouchstart = null
, but seems like one needs to do that for the specific element that d3-zoom uses instead.
The proper solution seems like implementing this navigator.maxtouchpoints
for Firefox and Chromium.
Closing this since a workaround has been found and it is not an iptsd issue.
My issue there is at https://github.com/d3/d3-zoom/issues/260 .
So
xinput list --long
shows a non-zero number of touch points. The number might be wrong, but it's not zero:Both Firefox and Chrome in both Wayland and Xwayland show
navigator.maxtouchpoints === 0
. That is what d3-zoom reads to enable itself. I don't know if this needs to be fixed in d3-zoom, Firefox, kwin, or iptsd.