From d7d4131f9fa78c40f4f1c1ee3a438a44fa903c12 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Thu, 17 Feb 2022 20:41:10 -0800 Subject: [PATCH] Set the scroll indicator offsets on the webview This prevents the scroll from bouncing when we scroll to the top we should figure out how to query for the system navigation bar size and use that instead of hard coding 50. --- apple/OmnivoreKit/Sources/Views/Article/WebAppView.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/apple/OmnivoreKit/Sources/Views/Article/WebAppView.swift b/apple/OmnivoreKit/Sources/Views/Article/WebAppView.swift index 0176a7dd7..e026a046f 100644 --- a/apple/OmnivoreKit/Sources/Views/Article/WebAppView.swift +++ b/apple/OmnivoreKit/Sources/Views/Article/WebAppView.swift @@ -35,6 +35,7 @@ import WebKit webView.backgroundColor = UIColor.clear webView.configuration.userContentController = contentController webView.scrollView.delegate = context.coordinator + webView.scrollView.scrollIndicatorInsets = UIEdgeInsets(top: 50, left: 0, bottom: 0, right: 0) for action in WebViewAction.allCases { webView.configuration.userContentController.add(context.coordinator, name: action.rawValue)