Search Issue Tracker
Won't Fix
Votes
0
Found in
2020.3.42f1
2021.3.14f1
2022.1.23f1
2022.2.0b16
2023.1.0a19
Issue ID
UUM-20542
Regression
No
Scrollview height changes when expanding Foldout elements
Reproduction steps:
- Open the attached project “ScrollViewBug”
- Open the Scene “Assets/Scenes/SampleScene”
- Enter the Play Mode
- Expand the Foldouts
Expected result: The size of the ScrollView stays the same
Actual result: The ScrollView expands in size while pushing other elements out of the game view
Reproducible with: 2020.3.42f1, 2021.3.14f1, 2022.1.23f1, 2022.2.0b16, 2023.1.0a19
Reproducible on: Windows 11
Note: The workaround is to change ScrollView size from “auto” to “fixed size”
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Unity CIL Linker fails on Player build when persistent listeners have "<" and ">" in their XML attribute names
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
Resolution Note:
Hi! The reason that the ScrollView height changes is because it has flex-grow set to 1, while the other roots have a flex-grow set to 0 and a flex-shrink set to 1. This will make the ScrollView try to take as much of the available space as possible.
To fix this, you can set the flex-shrink of the two other roots to 0.