Leaflet / Leaflet.fullscreen

A fullscreen control for Leaflet
http://leaflet.github.io/Leaflet.fullscreen/
ISC License
436 stars 117 forks source link

fullscreenElement doesn't get changed if map is refreshed #65

Closed VidhyaApple closed 7 years ago

VidhyaApple commented 7 years ago

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?

jfirebaugh commented 7 years ago

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

jfirebaugh commented 7 years ago

No response; closing.