fix(ios): apply background color behind status bar - #8609
Open
skyfallsin wants to merge 1 commit into
Open
skyfallsin wants to merge 1 commit into
skyfallsin wants to merge 1 commit into
Conversation
skyfallsin
marked this pull request as ready for review
September 17, 2026 23:25
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.
Summary
ios.backgroundColorwas applied to Capacitor'sWKWebView, but not to the visible top safe area behind iOS's transparent status bar. Apps could configure a native background color and still see the system fallback color above their content.This adds a non-interactive native view between the WebView's top edge and its top safe-area anchor. It uses the configured
ios.backgroundColor, falling back tosystemBackgroundwhen no color is configured.Visual verification
A real Capacitor app in the iOS Simulator was configured with:
rgb(246,247,250)rgb(255,0,0)Screenshots are available in the internal verification record; they can be attached here if needed.
Testing
testConfiguredBackgroundCoversStatusBarSafeArea, which verifies that Capacitor installs the configured, non-interactive native status-area view inside the WebView.CapacitorTests/testConfiguredBackgroundCoversStatusBarSafeAreaon an iOS Simulator: 1 test, 0 failures.git diff --checkpasses.Related issues
ios.backgroundColorfor the WebView itself. This change covers the remaining visible top safe-area region behind the transparent iOS status bar.backgroundColorappeared ineffective on iOS.StatusBar.setBackgroundColorAPI. This uses the documented native WebView background configuration rather than changing that API.