deck.gl icon indicating copy to clipboard operation
deck.gl copied to clipboard

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

Open ef2k opened this issue 2 years ago • 2 comments

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

  • [X] Script tag
  • [X] React
  • [ ] Python/Jupyter notebook
  • [ ] MapboxOverlay
  • [ ] GoogleMapsOverlay
  • [ ] CartoLayer
  • [X] ArcGIS

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

  • Framework version: 8.9.12
  • Browser: Firefox 112
  • OS: MacOS/Windows

Logs

No console logs errors/warnings reported.

ef2k avatar May 03 '23 18:05 ef2k

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?

felixpalmer avatar May 19 '23 08:05 felixpalmer

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.

b-bricker avatar May 14 '24 14:05 b-bricker