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@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
(cherry picked from commit c7e38e6348a98c0a6fcaf20876c57cb01d56f4cc)
This commit is contained in:
Tor Lillqvist 2019-10-04 14:45:05 +03:00
parent ef98d92cb9
commit 0e49800418

View file

@ -44,6 +44,7 @@
self.webView = [[WKWebView alloc] initWithFrame:CGRectZero configuration:configuration]; self.webView = [[WKWebView alloc] initWithFrame:CGRectZero configuration:configuration];
self.webView.translatesAutoresizingMaskIntoConstraints = NO; 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, // 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. // so the problem is still there when using Online from Mobile Safari.