Closed skirridsystems closed 8 months ago
Nice catch !
'k the bug come from _handleFullscreenChange()
which is fired on fullscreenchange
event for every map on the page leading to the bug :\
This come from https://github.com/brunob/leaflet.fullscreen/blob/master/Control.FullScreen.js#L178 which was introduced to handle fullscreenchange
on exit key press.
We have to find a workaround, something inspired by https://github.com/Leaflet/Leaflet.fullscreen/blob/gh-pages/dist/Leaflet.fullscreen.js#L120
If there are multiple maps on a page, e.g. showing different walking routes in an area, if you enter and then exit fullscreen on one map, the fullscreen button on all the other maps then shows the exit fullscreen icon and text, even though they are clearly not fullscreened.
This only affects buttons which have not yet been clicked. If I then fullscreen/exit on a different map, the first map to be fullscreened shows the correct icon state.