summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormert <mert.tumer@collabora.com>2020-03-27 19:24:17 +0300
committerAndras Timar <andras.timar@collabora.com>2020-03-27 19:36:20 +0100
commit8228a56544160f34d876aa4d4b1a56691226bd9a (patch)
treedea54def02fe1a8c7d9d2d73bb646b0f2cd201bf
parent1704c7c9564bf151a7fd788f0343978616f9d0a1 (diff)
Fix url popups can't be clicked on browserscp-4.2.1-2CODE-4.2.1-2
Change-Id: I3c2008e06370b4b48a93b68e58ad1e45a4f75d27 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91230 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit 272715a96d5f9b040a9f2e87414dfcef2c4972d6) Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91180 Tested-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--loleaflet/src/layer/tile/TileLayer.js2
-rw-r--r--loleaflet/src/map/handler/Map.TouchGesture.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index 2e560233e..17521d449 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1119,7 +1119,7 @@ L.TileLayer = L.GridLayer.extend({
// # for internal links
if (!url.startsWith('#')) {
this._map.hyperlinkPopup = new L.Popup({className: 'hyperlink-popup', closeButton: false, closeOnClick: false})
- .setContent('<div id="hyperlinkpopup" style="color: #000099; text-decoration: underline;">'+url+'</div>')
+ .setContent('<a href="' + url + '" target="_blank">' + url + '</a>')
.setLatLng(position)
.openOn(this._map);
}
diff --git a/loleaflet/src/map/handler/Map.TouchGesture.js b/loleaflet/src/map/handler/Map.TouchGesture.js
index 20143958f..470851455 100644
--- a/loleaflet/src/map/handler/Map.TouchGesture.js
+++ b/loleaflet/src/map/handler/Map.TouchGesture.js
@@ -326,9 +326,9 @@ L.Map.TouchGesture = L.Handler.extend({
this._toolbar.remove();
// clicked a hyperlink popup - not really designed for this.
- if (this._map.hyperlinkPopup && e.target && e.target.id === 'hyperlinkpopup' &&
+ if (this._map.hyperlinkPopup && e.target &&
this._map.hyperlinkPopup._contentNode == e.target.parentNode)
- this._map.fire('hyperlinkclicked', {url: e.target.innerHTML});
+ this._map.fire('hyperlinkclicked', {url: e.target.href});
this._map.fire('closepopups');
this._map.fire('closemobilewizard');