loleaflet/src/map/Map.js |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit b7d4e766976e1a5b5fb46fdc4b943da7f0904e5b
Author: Pranav Kant <pran...@collabora.co.uk>
Date:   Fri Mar 30 00:10:15 2018 +0530

    Ignore 'scroll' event on map container
    
    Cherry-picked from:
    
    commit 558f8c3a065e8fafa2d8912fd9c88625a8c3de97
    Author: Iván Sánchez Ortega <i...@mazemap.no>
    Date:   Mon Mar 30 14:34:39 2015 +0200
    
        Fix #3333 by catching the onScroll event on the map container
    
    from upstream Leaflet.
    
    Thanks a lot to Kendy and Aron for extensive debugging.
    
    Change-Id: I940cdf43b5d7d8f8368b4a01dcfc3417085eb4c7
    Reviewed-on: https://gerrit.libreoffice.org/52126
    Reviewed-by: Jan Holesovsky <ke...@collabora.com>
    Tested-by: Jan Holesovsky <ke...@collabora.com>

diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 6f61d266e..cf1fb7216 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -696,9 +696,15 @@ L.Map = L.Evented.extend({
                this._fileDownloader = L.DomUtil.create('iframe', '', 
container);
                L.DomUtil.setStyle(this._fileDownloader, 'display', 'none');
 
+               L.DomEvent.addListener(container, 'scroll', this._onScroll, 
this);
                container._leaflet = true;
        },
 
+       _onScroll: function() {
+               this._container.scrollTop = 0;
+               this._container.scrollLeft = 0;
+       },
+
        _initLayout: function () {
                var container = this._container;
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to