Repository navigation
fix(ios): measure padded LiquidGlass content inside its padding - #11562
Merged
NathanWalker merged 2 commits intoOct 21, 2026
Merged
Conversation
LiquidGlass and LiquidGlassContainer zeroed their padding and border while measuring (NativeScript#11134), assuming the parent had already removed the child's padding from the measure spec. No layout does that, so padded content was measured at the full width and then offset by the padding in onLayout, overflowing and clipping. Measure through GridLayout/AbsoluteLayout as-is and keep the local-coordinate onLayout. Closes NativeScript#11561
|
View your CI Pipeline Execution ↗ for commit 48ba7fd
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
commit: |
NathanWalker
approved these changes
Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
FLEXBOXLAYOUTsuite was run (details below).What is the current behavior?
On iOS,
LiquidGlassandLiquidGlassContaineroverrideonMeasure(added in #11134). The override sets their effective padding and border to zero while delegating toGridLayout/AbsoluteLayout. It assumes the parent already removed the child's padding from the measure spec, but no layout does that.View.measureChildsubtracts only margins, and the iOSFlexboxLayoutsubtracts its own padding plus the child's margins.The result:
LiquidGlassmeasures its content at the full outer width.onLayout, which runs with the padding restored, then offsets the content by the leading padding, so it overflows and is clipped.LiquidGlassContainerwith no set size comes out too small by its padding.Fixes #11561.
What is the new behavior?
onMeasureoverrides are removed, so measurement runs as plainGridLayout/AbsoluteLayoutand includes the padding.onLayoutnormalization from fix(ios): liquid glass flexbox #11134 (laying out children in the_contentHostlocal coordinate space) is unchanged.testLiquidGlassFlexboxLayout, which uses no padding, still passes.New tests in
flexbox-layout-tests.ts:testLiquidGlassFlexboxLayout_padding_measures_content_box: a 300 dip glass with 20 dip horizontal padding holds a stretched child. The child must be 260 dip wide and start 20 dip in.testLiquidGlassContainerFlexboxLayout_padding_wraps_content: an auto-sized container with 20/10 dip padding around a 100×40 child must be 140×60 dip.Verification (iOS 27.0 simulator,
apps/automatedwith the run filtered toFLEXBOXLAYOUT):main: 97 OK, 2 failed. The two failures are the new tests.tsc -p packages/core/tsconfig.lib.json --noEmitis clean.