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.
This commit is contained in:
Jackson Harper 2022-02-17 20:41:10 -08:00
parent 89d8b71bd4
commit d7d4131f9f

View file

@ -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)