summaryrefslogtreecommitdiff
path: root/ios
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2019-05-20 16:14:01 +0300
committerTor Lillqvist <tml@collabora.com>2019-05-20 16:25:52 +0300
commit058b68fc3e10161f420eb5951f497a19d078d474 (patch)
treeef163d24764d93a57e40055e404c80f7c6f44758 /ios
parenta31c7c851cad3ab66d28a1b08f0c0901638b57e3 (diff)
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
Diffstat (limited to 'ios')
-rw-r--r--ios/Mobile/DocumentViewController.mm5
1 files changed, 5 insertions, 0 deletions
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;