Map click issue between map and inspect view
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
Thanks @fredj, I can reproduce the issue.
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
Added fix to mapbox-gl-inspect in https://github.com/lukasmartinelli/mapbox-gl-inspect/pull/20
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