Leaflet/Leaflet.fullscreen

fullscreenElement doesn't get changed if map is refreshed

VidhyaApple opened this issue · 2 comments

I use leaflet3.js and leaflet-fullscreen-min.js In map, I have fullscreen control button to toggle between maximize and minimize. If page reloads, everthing works fine. But if only map div reloads, fullscreenElement doesn't get updated with new div.

This reference states that - If there's more than one element in the full-screen mode element stack, then this property returns the top element.

So when map div refreshes, fullscreenElement doesn't get updated with new one. This is a bug in leaflet3.js

when map in minimized state, it displays maximize icon (This is ok)
screenshot_2017-06-08_10-52-25
So once map is maximized, icon doesn't change to minimize button
screenshot_2017-06-08_10-56-26
Problem is, fullscreenElement doesn't get changed if a page has more than one map (ie. div reloads with same map again which is not reflected in fullscreenElement).

What would be the solution for this?

Not sure I understand the steps involved here. Could you please create a minimal standalone example on JSFiddle that demonstrates the issue?

No response; closing.