visgl / deck.gl

WebGL2 powered visualization framework
https://deck.gl
MIT License
12.29k stars 2.09k forks source link

[Bug] In Firefox, onHover stops being called after click #7869

Open ef2k opened 1 year ago

ef2k commented 1 year ago

Description

Hi 👋🏼 , using Firefox with DeckGL & Arcgis:

When an onHover handler is registered for the DeckLayer (layer.deck.onHover) it is no longer called after a mouse click.

So far, this only manifests in Firefox (Chrome and Edge are working correctly).

I tried to keep the code as minimal as possible to showcase the issue:

const layer = new DeckLayer();

layer.deck.onHover = function (info) { // <-- works until a click on the map
  console.log("[hover]", info); 
};

new MapView({
  container: "viewDiv",
  map: new ArcGISMap({
    basemap: "dark-gray-vector",
    layers: [layer],
  }),
  center: NYC_COORDINATE,
  zoom: 5,
});

You can see a working example in CodeSandbox here:

https://codesandbox.io/p/sandbox/bug-onhover-bug-in-deck-gl-arcgis-with-firefox-54cdg2?file=%2FREADME.md

Video of the bug is here:

https://user-images.githubusercontent.com/489428/236014621-7bcd382f-53c6-4b9c-98ed-e8517e9ba613.mp4

Please let me know if I can help in any other way.

Thank you!

Flavors

Expected Behavior

The onHover callback should be called after click events as well. The bug seems isolated to Firefox.

Steps to Reproduce

To reproduce:

  1. Using Firefox browse to this CodeSandbox link.
  2. Open the devTools console.
  3. Hover over the map, expect to see console messages prefixed with [hover].
  4. Click anywhere on the map.
  5. Hover over the map, expect to no longer see the console messages.

Live version here: https://codesandbox.io/p/sandbox/bug-onhover-bug-in-deck-gl-arcgis-with-firefox-54cdg2?file=%2FREADME.md

Environment

Logs

No console logs errors/warnings reported.

felixpalmer commented 1 year ago

We receive the events from the ArcGIS library so my first guess would be that the bug is coming from there. Could you report which @arcgis/core package version you are using and also check if the bug is present in the last few versions?

b-bricker commented 6 months ago

Found this issue while experiencing the same problem. I am currently on @arcgis/core version 4.29.10 with @deck.gl/arcgis core and layers at version 9.0.14 and firefox 125.0.3.