[iOS] Over-zealous applying of progressViewOffset prevents UIScrollView/UIRefreshControl OS behavior #35283
Labels
Component: RefreshControl
Component: ScrollView
Needs: Triage 🔍
Platform: iOS
iOS applications.
Stale
There has been a lack of activity on this issue and it may be closed soon.
Description
UIRefreshControl has a tight integration with iOS in terms of UINavigationBar/UIScrollView. In this regard, whenever there's a UIScrollView with a UINavigationBar on top, the OS automatically adjusts the contentInset of the UIScrollView to reflect that (something that is exposed to React Native). In a similar manner, UIScrollView passes this along to the attached UIRefreshControl.
On RCTRefreshControl, by always applying the progressViewOffset (which in turn, changes the
.frame
property of the view), this behavior is broken, resulting in non-native experience.This is fixed by #35281
Version
0.70.5
Output of
npx react-native info
info Fetching system and libraries information...
System:
OS: macOS 13.0
CPU: (8) arm64 Apple M1
Memory: 91.36 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.13.2 - ~/.nvm/versions/node/v16.13.2/bin/node
Yarn: Not Found
npm: 8.1.2 - ~/.nvm/versions/node/v16.13.2/bin/npm
Watchman: Not Found
Managers:
CocoaPods: Not Found
SDKs:
iOS SDK:
Platforms: DriverKit 22.1, iOS 16.1, macOS 13.0, tvOS 16.1, watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8609683
Xcode: 14.1/14B47b - /usr/bin/xcodebuild
Languages:
Java: 17.0.2 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: ^18.1.0 => 18.1.0
react-native: ^0.70.5 => 0.70.5
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
Observe the ScrollView adjusts correctly (when told to do so via the
contentInsetAdjustmentBehavior="automatic"
property) but this adjustment does not reflect on the RefreshControl, due to this bugSnack, code example, screenshot, or link to a repository
Example of repro in the reproducer:
Reproducer: https://github.com/objectivecosta/RCTRefreshControlBugReproducer
The text was updated successfully, but these errors were encountered: