[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - ios/Mobile

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Fri Oct 4 11:55:13 UTC 2019


 ios/Mobile/DocumentViewController.mm |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit c7e38e6348a98c0a6fcaf20876c57cb01d56f4cc
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Fri Oct 4 14:45:05 2019 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Fri Oct 4 13:54:55 2019 +0200

    tdf#127942: Avoid the WKWebView popup with "Share...", "Add to Photos" etc
    
    Seems that setting allowsLinkPreview to NO for the WKWebView affects
    this functionality, too. Was just an educated guess, and it worked!
    Single-line fixes to what initially seems like a hard problem are the
    best.
    
    Change-Id: Ic88bf53b883d857338c0316188e079e6797a4d76
    Reviewed-on: https://gerrit.libreoffice.org/80208
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Tested-by: Tor Lillqvist <tml at collabora.com>

diff --git a/ios/Mobile/DocumentViewController.mm b/ios/Mobile/DocumentViewController.mm
index 6f1891b35..183e57250 100644
--- a/ios/Mobile/DocumentViewController.mm
+++ b/ios/Mobile/DocumentViewController.mm
@@ -44,6 +44,7 @@
 
     self.webView = [[WKWebView alloc] initWithFrame:CGRectZero configuration:configuration];
     self.webView.translatesAutoresizingMaskIntoConstraints = NO;
+    self.webView.allowsLinkPreview = NO;
 
     // Prevent the WebView from scrolling. Sadly I couldn't figure out how to do it in the JS,
     // so the problem is still there when using Online from Mobile Safari.


More information about the Libreoffice-commits mailing list