[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-1' - loleaflet/src

mert (via logerrit) logerrit at kemper.freedesktop.org
Fri Mar 27 18:36:38 UTC 2020


 loleaflet/src/layer/tile/TileLayer.js         |    2 +-
 loleaflet/src/map/handler/Map.TouchGesture.js |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 8228a56544160f34d876aa4d4b1a56691226bd9a
Author:     mert <mert.tumer at collabora.com>
AuthorDate: Fri Mar 27 19:24:17 2020 +0300
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Mar 27 19:36:20 2020 +0100

    Fix url popups can't be clicked on browsers
    
    Change-Id: I3c2008e06370b4b48a93b68e58ad1e45a4f75d27
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91230
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    (cherry picked from commit 272715a96d5f9b040a9f2e87414dfcef2c4972d6)
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91180
    Tested-by: Andras Timar <andras.timar at collabora.com>

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');


More information about the Libreoffice-commits mailing list