[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - loleaflet/src
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Wed Sep 23 16:39:21 UTC 2020
loleaflet/src/control/Control.AlertDialog.js | 8 ++++++++
1 file changed, 8 insertions(+)
New commits:
commit bd85bf3a1d488ebc621fdfb9fdc512a1a32f0904
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Sep 22 13:38:56 2020 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Sep 23 18:39:02 2020 +0200
Send HYPERLINK post message when link opened
Send only for non-app builds where window.postMobileMessage is not defined.
Needed when embedded in webview in "other" iOS app.
Change-Id: I17f3b378557ef33579ae932db9cf1718c7a18a7e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103166
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/loleaflet/src/control/Control.AlertDialog.js b/loleaflet/src/control/Control.AlertDialog.js
index 8118a30f1..e417f9386 100644
--- a/loleaflet/src/control/Control.AlertDialog.js
+++ b/loleaflet/src/control/Control.AlertDialog.js
@@ -64,6 +64,14 @@ L.Control.AlertDialog = L.Control.extend({
click: function openClick () {
window.open(url, '_blank');
vex.closeAll();
+
+ if (!window.ThisIsAMobileApp &&
+ window.webkit &&
+ window.webkit.messageHandlers &&
+ window.webkit.messageHandlers.lool &&
+ window.webkit.messageHandlers.lool.postMessage) {
+ window.webkit.messageHandlers.lool.postMessage('HYPERLINK ' + url);
+ }
}
});
}
More information about the Libreoffice-commits
mailing list