I have an Android-webview including a d3.js (v5) graph. Recently, the graph stopped responding to any events (drag, click, zoom) on several devices. I did not update the code base, so I guess it's related to an Android update?
I used Remote Webview debugging with chrome devtools but I did not manage to find the root cause.
I used monitorEvents
to track the events. And the zoom & drag features started to work again until I used unmonitorEvents
.
Any idea, on why would these events stop working suddenly and what is the side effect on monitorEvents
?
Thanks for your help :)
PS: the webpage works without the webview.
The nodes are clickable, the whole graph can be moved or zoomed in and out.
EDIT2: Found a first solution.
After some search, I found this https://developers.google.com/web/updates/2016/10/pointer-events : the new events for mouse & touch actions. monitorEvents
was doing an addEventListener
for all onpointer{something}
which was fixing the d3 code.
Right now, I am adding dump listeners to the root . That looks pretty ugly. What is the right action?