The following code is not working correctly and because I know nothing about leaflet I don't have a solution. I assume this is supposed to detect when the user clicks outside of leaflet and closes the map. It currently closes the map even when clicked on the map without reporting the location. I changed the line above it to:
var close = false;
and this bandaids the problem but doesn't fix it.
while (p) { if (p._leaflet) { close = false; break; } p = p.parentElement; }
The following code is not working correctly and because I know nothing about leaflet I don't have a solution. I assume this is supposed to detect when the user clicks outside of leaflet and closes the map. It currently closes the map even when clicked on the map without reporting the location. I changed the line above it to:
var close = false;
and this bandaids the problem but doesn't fix it.
while (p) { if (p._leaflet) { close = false; break; } p = p.parentElement; }