Reproduction steps:
1. Open the attached “BugRepro” project
2. Open the “Assets/Scenes/SampleScene.unity” scene
3. Enter the Play Mode
4. Scroll down in the red area of the Game View, till you see both black and red areas
5. Click the blue button to set the DisplayStyle to None
6. Click the blue button to reset the DisplayStyle to Flex
Expected results: ScrollView scroll offset stays the same after setting the DisplayStyle to None and resetting it back to Flex
Actual results: ScrollView scroll offset gets reset to 0
Reproduced with: 2021.3.40f1, 2022.3.35f1, 6000.0.8f1
Reproduced on: Windows 10
Notes:
- In Editor, using a normal mouse with the usual mouse scroll it is really hard to reproduce. Using a mouse with a flywheel makes the reproduction easier.
- On a mobile touchscreen, this issue is reproducible every time (tested with an Android)