diff --git a/src/map/Map.js b/src/map/Map.js index 74f44822..74e735d4 100644 --- a/src/map/Map.js +++ b/src/map/Map.js @@ -440,6 +440,7 @@ L.Map = L.Evented.extend({ throw new Error('Map container is already initialized.'); } + L.DomEvent.addListener(container, 'scroll', this._onScroll, this); container._leaflet = true; }, @@ -569,6 +570,11 @@ L.Map = L.Evented.extend({ function () { this.invalidateSize({debounceMoveend: true}); }, this, false, this._container); }, + _onScroll: function () { + this._container.scrollTop = 0; + this._container.scrollLeft = 0; + }, + _handleDOMEvent: function (e) { if (!this._loaded || L.DomEvent._skipped(e)) { return; }