react-native-macos/React/Views/ScrollView
Emilio 7a4753d76a tapping on iOS status bar should scroll inverted ScrollViews to their top (#27574)
Summary:
React Native ScrollViews are flipped upside down when the prop inverted is set to true. This is the root of a bug: tapping on the status bar in iOS should scroll the Flatlist up to the top but currently it does to the bottom.

The solution proposed is to detect natively if the ScrollView is inverted, on such case, prevent it from scrolling it to the beginning of the ScrollView (as a non-inverted ScrollView would do) and force a scroll to the end of it.

I've been careful enough not to force the scroll if the user explicitly selected not to do it or if it's happening in a nested ScrollView, as it is the default behaviour in iOS.

Fixes https://github.com/facebook/react-native/issues/21126

## Changelog

[iOS] [Fixed] - Inverted ScrollViews scroll to their bottom when the status bar is pressed
Pull Request resolved: https://github.com/facebook/react-native/pull/27574

Test Plan:
- on iOS, add a ScrollView and put enough content to overflow the screen size so it can be scrolled
- add the prop `inverted={true}` to the ScrollView
- go to the screen the Scrollview is in and press the status bar
- it should scroll to top (previously it scrolled to the bottom)

![v](https://user-images.githubusercontent.com/807710/71188640-a0ac6680-2281-11ea-91a7-d1e46aba8b14.gif)

Differential Revision: D19185270

Pulled By: hramos

fbshipit-source-id: 5445093ff38f4ba4082f1d883d8ed087e9565eaf
2019-12-19 15:29:54 -08:00
..
RCTScrollContentShadowView.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTScrollContentShadowView.m Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTScrollContentView.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTScrollContentView.m Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTScrollContentViewManager.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTScrollContentViewManager.m Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTScrollEvent.h Tidy up license headers 2019-11-11 17:59:06 -08:00
RCTScrollEvent.m Tidy up license headers 2019-11-11 17:59:06 -08:00
RCTScrollView.h tapping on iOS status bar should scroll inverted ScrollViews to their top (#27574) 2019-12-19 15:29:54 -08:00
RCTScrollView.m tapping on iOS status bar should scroll inverted ScrollViews to their top (#27574) 2019-12-19 15:29:54 -08:00
RCTScrollViewManager.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTScrollViewManager.m tapping on iOS status bar should scroll inverted ScrollViews to their top (#27574) 2019-12-19 15:29:54 -08:00
RCTScrollableProtocol.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00