[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - ios/Mobile
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon May 20 13:19:00 UTC 2019
ios/Mobile/DocumentViewController.mm | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 9935db68d66243edb414a94583eeee72fc09a49c
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Mon May 20 16:14:01 2019 +0300
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Mon May 20 16:17:27 2019 +0300
tdf#122281: Prevent the WebView from scrolling
It is presumably possible to do it in the JavaScript, too, and then
the same problem would go away for normal Online viewed in Mobile
Safari, too. But I couldn't figure out how. Googling turned up various
advice that suggested using '-webkit-overflow-scrolling: auto;' for
the body of the page but it didn't seem to help. (I tried adding that
to the style attribute of the body element in loleaflet.html.m4.)
Change-Id: Iac3487a73eca218130583dde9decdb89c316c1fc
diff --git a/ios/Mobile/DocumentViewController.mm b/ios/Mobile/DocumentViewController.mm
index ff2d2f1ab..dc61ef23c 100644
--- a/ios/Mobile/DocumentViewController.mm
+++ b/ios/Mobile/DocumentViewController.mm
@@ -44,6 +44,11 @@
self.webView = [[WKWebView alloc] initWithFrame:CGRectZero configuration:configuration];
self.webView.translatesAutoresizingMaskIntoConstraints = 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.
+ self.webView.scrollView.scrollEnabled = NO;
+
[self.view addSubview:self.webView];
self.webView.navigationDelegate = self;
More information about the Libreoffice-commits
mailing list