UIGridLayouts that change the AbsoluteSize/AbsolutePosition of their siblings who are ScrollingFrames with an AutomaticCanvasSize property that is equal to Enum.AutomaticSize.Y
break the automatic sizing of all TextLabels and TextButtons who are descendants of the ScrollingFrame(s) and who have an AutomaticSize property that is equal to Enum.AutomaticSize.Y
Sorry that this is so convoluted - it was difficult to produce a repro to this: UIGridLayouts sometimes do not re-render some GuiObjects when parented away, and only re-parenting the children themselves forces a re-render.
uigridlayout-scrollingframe-textobject-descendants-incorrect-automaticsize-behavior.rbxl (53.8 KB)
Steps to reproduce with the file provided:
- Parent the UIGridLayout under StarterGui to the ScreenGui under StarterGui
- Every TextButton and TextLabel will change to report 0 for their AbsoluteSize.Y
- Parent the UIGridLayout back to StarterGui
- Every TextButton and TextLabel will resize to correctly report their height
This bug occurs regardless of whether the UIGridLayout parent is a LayoutCollector or GuiObject, but only affects the UIGridLayout’s siblings and those siblings’ descendants
Expected behavior
TextObjects’ AbsoluteSize should be equal to at least some combination of:
- Their TextBounds
- Their children who are GuiObjects’ AbsoluteSize (if applicable)
- Padding from a child who is a UIPadding (if applicable)
- AbsoluteContentSize from a child who is a UIGridStyleLayout (if applicable)