Skip to content

[Cherry-pick] Workaround iOS 26.0 safe area layout region bug (#3018)#3019

Merged
Vlad Konstantinov (Kpotko) merged 1 commit into
release/1.11from
svastven/cherry-pick-3018
Apr 27, 2026
Merged

[Cherry-pick] Workaround iOS 26.0 safe area layout region bug (#3018)#3019
Vlad Konstantinov (Kpotko) merged 1 commit into
release/1.11from
svastven/cherry-pick-3018

Conversation

@svastven

Copy link
Copy Markdown

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

  • (prerelease fix) Fix WindowInsets.systemBars add extra horizontal insets on iOS 26.0

`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
@Kpotko Vlad Konstantinov (Kpotko) merged commit a56419b into release/1.11 Apr 27, 2026
17 checks passed
@Kpotko Vlad Konstantinov (Kpotko) deleted the svastven/cherry-pick-3018 branch April 27, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants