Skip to content

Workaround iOS 26.0 safe area layout region bug#3018

Merged
Vendula Švastalová (svastven) merged 1 commit into
jb-mainfrom
svastven/bugfix/insets-ios26
Apr 27, 2026
Merged

Workaround iOS 26.0 safe area layout region bug#3018
Vendula Švastalová (svastven) merged 1 commit into
jb-mainfrom
svastven/bugfix/insets-ios26

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

@svastven Vendula Švastalová (svastven) merged commit 73805dc into jb-main Apr 27, 2026
18 checks passed
@svastven Vendula Švastalová (svastven) deleted the svastven/bugfix/insets-ios26 branch April 27, 2026 15:08
Vlad Konstantinov (Kpotko) added a commit that referenced this pull request Apr 27, 2026
…#3019)

`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
Sajid Ali (sajidalidev) pushed a commit to sajidalidev/compose-multiplatform-core-tvos that referenced this pull request May 6, 2026
`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
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.

3 participants