From b1479d939adf7f02f96152adce478efbd0a58e78 Mon Sep 17 00:00:00 2001 From: Maurice Date: Thu, 24 Sep 2026 13:36:27 +0200 Subject: [PATCH] fix(native): no overscroll stretch on Android The UI asks for no overscroll effect with overscroll-behavior: none on html, and Chrome honours it. The Android WebView draws the stretch on its root scroller natively, though, and it scales the whole view, so the top bar and the bottom dock were pulled along with the page. Found in the emulator. --- .../app/src/main/java/com/liketrek/trek/MainActivity.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/android/app/src/main/java/com/liketrek/trek/MainActivity.java b/client/android/app/src/main/java/com/liketrek/trek/MainActivity.java index a5d32a1b8..445cd5832 100644 --- a/client/android/app/src/main/java/com/liketrek/trek/MainActivity.java +++ b/client/android/app/src/main/java/com/liketrek/trek/MainActivity.java @@ -1,6 +1,7 @@ package com.liketrek.trek; import android.os.Bundle; +import android.view.View; import com.getcapacitor.BridgeActivity; public class MainActivity extends BridgeActivity { @@ -17,5 +18,9 @@ public class MainActivity extends BridgeActivity { config = TrekServerStore.configFor(this, server); } super.onCreate(savedInstanceState); + // The UI asks for no overscroll effect (overscroll-behavior: none on html) + // and Chrome honours that, but the WebView draws the stretch on its root + // scroller natively. It scales the whole view, top bar and bottom dock included. + if (bridge != null) bridge.getWebView().setOverScrollMode(View.OVER_SCROLL_NEVER); } }