forge
Explore
Log in

Don't you dare go Hollow

Turn off the webview's own scrollbars

Browse files at this commit

7dba8670712c19f5b003170e3e7d3326ab1e4930Burak BoduroğluParent: 7ec22c8
The page hides scrollbars in CSS, but those rules cannot reach the ones
Android draws over the webview itself, which is what still flashed down the
right edge while scrolling.
frontendmodified+1 -1
@@ -1 +1 @@
1-Subproject commit 76992e49645bfb81d882ee940179b1159cbcc04e1+Subproject commit 4448c0633bc8af87f783f58976e79eae15f6fe2c
src-tauri/gen/android/app/src/main/java/co/hezarfen/app/MainActivity.ktmodified+6 -0
@@ -29,6 +29,12 @@ class MainActivity : TauriActivity() {
29 // webview applies the insets itself.29 // webview applies the insets itself.
30 override fun onWebViewCreate(webView: WebView) {30 override fun onWebViewCreate(webView: WebView) {
31 this.webView = webView31 this.webView = webView
32+
33+ // The page hides scrollbars in CSS, but those rules cannot reach the ones
34+ // Android draws over the webview itself, which is what still flashes down
35+ // the right edge while scrolling.
36+ webView.isVerticalScrollBarEnabled = false
37+ webView.isHorizontalScrollBarEnabled = false
32 webView.addOnLayoutChangeListener { _, _, _, _, _, _, _, _, _ -> publishBottomInset() }38 webView.addOnLayoutChangeListener { _, _, _, _, _, _, _, _, _ -> publishBottomInset() }
33 // The first layout can land before the page has a document to set the39 // The first layout can land before the page has a document to set the
34 // property on; this catches that case.40 // property on; this catches that case.