stefanocudini / leaflet-locationpicker

Simple location picker on Leaflet map
https://opengeo.tech/maps/leaflet-locationpicker/
MIT License
55 stars 13 forks source link

Close code not working as intended. #17

Open BlogSafe opened 2 years ago

BlogSafe commented 2 years ago

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; }