Repository navigation
Patch Changes
-
#26
b1fbf3fThanks @Rednegniw! - Fix digits freezing mid-roll or disappearing when a slot mounts on a recycled Fabric viewThe native renderer's digit strip was an absolutely-positioned view at the
origin with only absolutely-positioned children, so its layout metrics were
exactly{0,0,0,0}. On Fabric, a recycledRCTViewComponentViewcompares
incoming layout metrics against its stored ones rather than the
EmptyLayoutMetricssentinel, and those stored metrics can be all-zero too:
React Native 0.85+ resets them to zero-initialized values in
prepareForRecycle, while older versions retain the donor view's metrics,
which may themselves be zero. A strip whose true layout is all-zero compared
equal, the frame assignment was skipped, and the strip kept the recycled
donor's frame - digits drew displaced or outside the clip window (frozen
half-glyphs, invisible digits) until the next React commit happened to
rewrite the subtree.The strip now lays out as a real box sized to its digit column
(maxDigitWidthx strip length, offset up by the pad, digits at non-negative
offsets inside), so its layout metrics are never all-zero and every mount
applies a correct frame.