Commit f057792
Hide misplaced iOS 26 scroll edge effects on inverted lists
Summary:
iOS 26 adds scroll edge effects, which UIKit positions in a scroll view's own coordinate space. Inverted virtualized lists are implemented with a `scaleY(-1)` transform on the scroll view, and UIKit does not account for it, so neither effect lands where it belongs:
- Against a navigation bar, `topEdgeEffect` darkens the lower half of the screen instead of the content passing under the bar.
- Against a bottom bar, `bottomEdgeEffect` dims the entire screen.
With both bars present the two stack, leaving content close to unreadable.
This reproduces with a plain `UIScrollView` carrying the same transform, with no React Native involved, so the underlying defect is in UIKit rather than here. What can be done from this side is stop the misplaced effects from rendering, so `RCTEnhancedScrollView` now hides both while the scroll view is inverted.
Nothing visible is lost by doing so. An inverted list never gets a usable edge effect at any scroll position; the only thing the effects produce while mirrored is the misplaced darkening. Giving the bars correct effects is not possible from here, because UIKit has no notion of the transform.
Reported as react-native#54181, migrated from software-mansion/react-native-screens#3293.
Changelog:
[iOS][Fixed] - Hide the misplaced iOS 26 scroll edge effects on inverted ScrollViews
Differential Revision: D1206414221 parent 972860a commit f057792
6 files changed
Lines changed: 33 additions & 0 deletions
File tree
- packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView
- scripts/cxx-api/api-snapshots
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
55 | 62 | | |
56 | 63 | | |
57 | 64 | | |
| |||
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
54 | 74 | | |
55 | 75 | | |
56 | 76 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
458 | 461 | | |
459 | 462 | | |
460 | 463 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1035 | 1035 | | |
1036 | 1036 | | |
1037 | 1037 | | |
| 1038 | + | |
1038 | 1039 | | |
1039 | 1040 | | |
1040 | 1041 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1035 | 1035 | | |
1036 | 1036 | | |
1037 | 1037 | | |
| 1038 | + | |
1038 | 1039 | | |
1039 | 1040 | | |
1040 | 1041 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1035 | 1035 | | |
1036 | 1036 | | |
1037 | 1037 | | |
| 1038 | + | |
1038 | 1039 | | |
1039 | 1040 | | |
1040 | 1041 | | |
| |||
0 commit comments