Change event Listner target from map.container to document (as in Leaflet)