[Cherry-pick] Workaround iOS 26.0 safe area layout region bug (#3018)#3019
Merged
Vlad Konstantinov (Kpotko) merged 1 commit intoApr 27, 2026
Merged
Conversation
`UIView.LayoutRegion.safeArea(cornerAdaptation:)` was introduced in iOS 26 to provide correct insets for the new macOS-like system controls (iPad). On iOS 26.0 this API reports different values than on iOS 26.1+ and adds unexpected horizontal safe-area insets. To avoid content being shifted horizontally **on iPhone**, we fall back to the pre–iOS 26 behavior (using `view.safeAreaInsets`) on **non-pad idioms** when running on iOS 26.0. The same issue can also affect iPad on iOS 26.0, but there we intentionally keep using layout regions: adopting the new iPad controls is prioritized even if it means accepting the extra horizontal inset on iOS 26.0. Fixes [CMP-10046](https://youtrack.jetbrains.com/issue/CMP-10046) WindowInsets.systemBars add some arbitrary horizontal space on iOS but not on Android ## Testing This should be tested by QA ## Release Notes ### Fixes - iOS - _(prerelease fix)_ Fix `WindowInsets.systemBars` add extra horizontal insets on iOS 26.0
Vlad Konstantinov (Kpotko)
approved these changes
Apr 27, 2026
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.
UIView.LayoutRegion.safeArea(cornerAdaptation:)was introduced in iOS 26 to provide correct insets for the new macOS-like system controls (iPad). On iOS 26.0 this API reports different values than on iOS 26.1+ and adds unexpected horizontal safe-area insets.To avoid content being shifted horizontally on iPhone, we fall back to the pre–iOS 26 behavior (using
view.safeAreaInsets) on non-pad idioms when running on iOS 26.0. The same issue can also affect iPad on iOS 26.0, but there we intentionally keep using layout regions: adopting the new iPad controls is prioritized even if it means accepting the extra horizontal inset on iOS 26.0.Fixes CMP-10046 WindowInsets.systemBars add some arbitrary horizontal space on iOS but not on Android
Testing
This should be tested by QA
Release Notes
Fixes - iOS
WindowInsets.systemBarsadd extra horizontal insets on iOS 26.0