loleaflet/src/map/Map.js |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 6b90da49d34be72fa3b315232cd0fd3b6ca3f560
Author:     Tor Lillqvist <t...@collabora.com>
AuthorDate: Tue Feb 12 11:31:36 2019 +0200
Commit:     Tor Lillqvist <t...@collabora.com>
CommitDate: Tue Feb 12 11:38:12 2019 +0200

    Unbreak running in Responsive Design Mode in Safari on macOS
    
    When "emulating" an iPad in Responsive Design Mode on macOS,
    L.Browser.touch is false so the code at the end of Map.Tap.js that
    calls L.Map.addInitHook() to add the 'tap' thing is not executed. But
    L.Browser.mobile is true, so the code in Map.js that tried to access
    this.tap was still executed and caused a 'TypeError: undefined is not
    an object'.
    
    Possibly this also helps in similar modes in other browsers.
    
    Change-Id: I5dbc1e6b9f80a8f691d400516d95ee950060ae18

diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 92d36160c..0883f1afd 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -112,7 +112,9 @@ L.Map = L.Evented.extend({
 
                if (L.Browser.mobile) {
                        this._clipboardContainer = 
L.control.mobileInput().addTo(this);
-                       this._clipboardContainer._cursorHandler.on('up', 
this.tap._onCursorClick, this.tap);
+                       if (this.tap !== undefined) {
+                               
this._clipboardContainer._cursorHandler.on('up', this.tap._onCursorClick, 
this.tap);
+                       }
                } else {
                        this._clipboardContainer = L.clipboardContainer();
                        this.addLayer(this._clipboardContainer);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to