maputnik icon indicating copy to clipboard operation
maputnik copied to clipboard

Map click issue between map and inspect view

Open fredj opened this issue 6 years ago • 5 comments

There's a small issue with the popup displayed on map click.

To reproduce:

  • open https://maputnik.github.io/editor
  • click the map: popup is correctly displayed
  • switch the view to "Inspect"
  • click the map: popup is correctly displayed
  • switch the view back to "Map"
  • click the map: no popup is displayed

fredj avatar Oct 25 '19 07:10 fredj

Thanks @fredj, I can reproduce the issue.

pathmapper avatar Oct 25 '19 08:10 pathmapper

I think the issue comes from mapbox-gl-inspect.

When the map is clicked in inspect mode this._popupBlocked is set to true: https://github.com/lukasmartinelli/mapbox-gl-inspect/blob/master/lib/MapboxInspect.js#L198

and when the mode is back to "Map", this test prevents the popups to be displayed: https://github.com/lukasmartinelli/mapbox-gl-inspect/blob/master/lib/MapboxInspect.js#L208

fredj avatar Oct 25 '19 08:10 fredj

I've put in a temporary fix in #584

@fredj would you like to submit a fix to mapbox-gl-inspect?

orangemug avatar Oct 27 '19 19:10 orangemug

Added fix to mapbox-gl-inspect in https://github.com/lukasmartinelli/mapbox-gl-inspect/pull/20

orangemug avatar May 19 '20 07:05 orangemug

I'm going to bump this to the next release also, because

  • The work has been done but I'd like to setup CI to auto-release lukasmartinelli/mapbox-gl-inspect on git version tag to npm
  • It currently doesn't cause any issues as we have a hack in place

orangemug avatar Jun 29 '20 15:06 orangemug