Leaflet.contextmenu
Leaflet.contextmenu copied to clipboard
Remove DOM nodes and DOM event listeners on map "unload" event.
We have many maps in our app. Every time user selects new entire Leaflet map is rebuild. It has been reported that if contextmenu is visible when user switches map it'll be visible on new map instance. While this was clearly our bug since we weren't clearing up DOM from map container, still....
Wouldn't it be proper if plugin cleans up it's own event listeners (especially DOM listeners) and remove DOM nodes when map is destroyed (unload event)?