Repository navigation
fix: restore system bar insets so FB header is tappable - #19
Merged
Merged
Conversation
Raising targetSdk to 35 (a804357) made Android 15 force edge-to-edge, so the WebView was drawn underneath the status bar and the system bar swallowed touches in that band. Facebook's own header back arrow and search icon stayed visible but became untappable. Opt out of edge-to-edge enforcement to restore the pre-API-35 behaviour of giving the system bars their own space. This attribute is deprecated and is only honoured up to targetSdk 35, so it is a stopgap: the real fix is explicit inset handling (fitsSystemWindows on the root FrameLayout, or ViewCompat.setOnApplyWindowInsetsListener applying systemBars() insets) with statsBadge and messengerButton kept inside the inset-safe area. Verified on device (moto g52): back arrow and search icon are tappable again.
8 tasks
Lint failed with NewApi: the attribute requires API level 35 while minSdk is 26. Move it into values-v35/ so it only applies where edge-to-edge enforcement exists; API 26-34 never forced edge-to-edge and keep the base theme unchanged. Fixes the lint error introduced by the previous commit.
mretallack
added a commit
that referenced
this pull request
Oct 16, 2026
Patch release fixing a regression introduced by the targetSdk 34 -> 35 bump in 1.2.0: Android 15 forced edge-to-edge, so the WebView was drawn underneath the status bar and Facebook's own header back arrow and search icon became visible but untappable (PR #19).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Since
a804357raisedcompileSdk/targetSdkfrom 34 to 35 (2026-10-11), Android 15 forces edge-to-edge: the WebView is drawn underneath the status bar, and the system bar swallows touches in that band.Symptom: Facebook's own header back arrow and search icon are visible but untappable. Taps land on the status bar rather than the WebView.
The app had no inset handling at all — no
fitsSystemWindows, noWindowInsetscode, no JS top-padding — so it relied entirely on the implicit inset that API 35 removed.Fix
Opt out of edge-to-edge enforcement in
themes.xmlto restore the pre-API-35 behaviour of giving the system bars their own space.Caveat — this is a stopgap
android:windowOptOutEdgeToEdgeEnforcementis deprecated and is only honoured up totargetSdk 35. It will be ignored in a future Android release, so it buys time rather than solving the problem.The real fix is explicit inset handling:
android:fitsSystemWindows="true"on the rootFrameLayout, orViewCompat.setOnApplyWindowInsetsListenerapplyingsystemBars()insets,with
statsBadgeandmessengerButtonkept inside the inset-safe area — otherwise the overlays end up under the status bar instead, which is the same class of bug as issue #9.A
TODOinthemes.xmlrecords this.Testing
Verified on a physical moto g52 (Android 15) after
adb install -r:statsBadge, Messenger button) still positioned correctly — needs a check on a build that has the Messenger buttonBuilt and verified the attribute is present in the APK:
Style/Theme.SlimBookitem0x0101069a = true.