[Libreoffice-commits] online.git: loleaflet/src
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Tue Apr 7 08:12:51 UTC 2020
loleaflet/src/control/Ruler.js | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
New commits:
commit 35b3f0ea904fcb95f9d12a915bb41be80868ccf9
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Mon Apr 6 16:55:37 2020 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Tue Apr 7 10:12:33 2020 +0200
cypress: mobile: fix exception related to currentTarget.
Change-Id: I672ceb28c6f14b8c08103d6c9677707b35cbdfc8
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91797
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/loleaflet/src/control/Ruler.js b/loleaflet/src/control/Ruler.js
index c190039cc..292e4d2b2 100644
--- a/loleaflet/src/control/Ruler.js
+++ b/loleaflet/src/control/Ruler.js
@@ -290,7 +290,7 @@ L.Control.Ruler = L.Control.extend({
// Are there any tab stops?
// e.currentTarget == this._rTSContainer, so yeah, we could use that, too.
- if (e.currentTarget.tabStops.length === 0)
+ if (!e.currentTarget || e.currentTarget.tabStops.length === 0)
return;
// Check if "close enough" to one unambiguous tab stop
@@ -348,6 +348,9 @@ L.Control.Ruler = L.Control.extend({
},
_moveTabstop: function(e) {
+ if (!e.currentTarget)
+ return;
+
var pixelDiff = e.layerX - e.currentTarget.tabStopPrevPos;
var diff = this._map._docLayer._pixelsToTwips({x: pixelDiff, y:0}).x;
if (diff === 0)
@@ -398,6 +401,9 @@ L.Control.Ruler = L.Control.extend({
},
_endTabstopDrag: function(e) {
+ if (!e.currentTarget)
+ return;
+
// console.log('===> _endTabstopDrag ' + e.type);
if (window.ThisIsTheiOSApp) {
L.DomEvent.off(e.currentTarget, 'touchmove', this._moveTabstop, this);
More information about the Libreoffice-commits
mailing list