[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Mar 4 15:13:36 UTC 2019
loleaflet/src/map/Map.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 819eb2a93926cc744918cb86b59176645c756071
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Tue Feb 12 11:31:36 2019 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Mon Mar 4 16:13:18 2019 +0100
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
Reviewed-on: https://gerrit.libreoffice.org/68335
Reviewed-by: Andras Timar <andras.timar at collabora.com>
Tested-by: Andras Timar <andras.timar at collabora.com>
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 79ef7d54d..9f7f35af3 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);
More information about the Libreoffice-commits
mailing list