loleaflet/src/control/Control.AlertDialog.js |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit bd85bf3a1d488ebc621fdfb9fdc512a1a32f0904
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Tue Sep 22 13:38:56 2020 +0200
Commit:     Andras Timar <andras.ti...@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 <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Andras Timar <andras.ti...@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);
+                                               }
                                        }
                                });
                        }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to