Commit a5a577a
fix(ios): default contentInsetAdjustmentBehavior to scrollableAxes on iOS 26+
On iOS 26+, Apple introduced the liquid glass design language with
translucent system chrome (tab bars, toolbars). Scroll views need
contentInsetAdjustmentBehavior set to scrollableAxes to automatically
adjust content insets for this translucent chrome.
This change upgrades the default from "never" to "scrollableAxes" on
iOS 26+ when UIDesignRequiresCompatibility is not YES, affecting:
- RCTEnhancedScrollView initWithFrame:
- RCTScrollViewComponentView updateProps: (upgrades JS default "never")
- RCTScrollViewComponentView prepareForRecycle
Apps that explicitly set contentInsetAdjustmentBehavior to "automatic",
"always", or "scrollableAxes" from JS are unaffected. Apps with
UIDesignRequiresCompatibility=YES retain the current "never" default.
Fixes #57299
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 066c0d8 commit a5a577a
2 files changed
Lines changed: 27 additions & 9 deletions
File tree
- packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
38 | 44 | | |
39 | 45 | | |
40 | 46 | | |
| |||
Lines changed: 17 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
439 | | - | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
440 | 446 | | |
441 | 447 | | |
442 | 448 | | |
| |||
698 | 704 | | |
699 | 705 | | |
700 | 706 | | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
705 | 717 | | |
706 | 718 | | |
707 | 719 | | |
| |||
0 commit comments