You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RN 0.85.0 StyleSheet.absoluteFillObject is removed #3965
The backdrop ends up with no position: 'absolute', no insets and no dimensions —
an unpositioned, zero-height, in-flow view. onBackgroundPress can therefore
never fire.
Hint — worst affected. It silently switches to a Modal whenever onBackgroundPress is passed (isUsingModal = Boolean(onBackgroundPress && useModal),
and useModal defaults to true). The hint becomes an undismissable
full-screen modal, so the entire app appears frozen. Taps on the hint bubble
still work, because onPress is wired directly to its own TouchableOpacity —
which makes this present as a selective touch/Fabric bug and sends you a very
long way down the wrong path.
Dialog — tap-outside-to-dismiss silently dead.
FeatureHighlight — same.
Minimal repro on RN >= 0.85 — tap outside the white box, the counter never moves:
The same modal written with StyleSheet.absoluteFill on the backdrop works
correctly, which isolates it to the removed API rather than to anything in RN's
renderer.
commons/modifiers.js:342 — absoluteFill: StyleSheet.absoluteFillObject backs
the absF modifier, so every component and every consumer app using absF
silently gets {}.
absoluteFillObject was only ever an alias. RN's StyleSheet.js has absoluteFillObject: absoluteFill — the same frozen object — unchanged back
through at least v0.72, v0.76 and v0.79. So a plain rename is safe on every RN
version this library supports, with no compatibility shim needed:
Verified end to end: renaming all 26 occurrences via a Yarn patch restores Dialog's tap-outside-to-dismiss and Hint's onBackgroundPress on RN 0.86.2 /
react-native-ui-lib 9.1.2.
Happy to open a PR with the rename if that's useful.
Note on the polyfill workaround suggested above
StyleSheet.absoluteFillObject = StyleSheet.absoluteFill does work, but only if it
executes before any of this library's modules are evaluated — the affected styles
are all built at module scope via StyleSheet.create. That makes it dependent on
entry-file import order, and when it fails it fails silently, in the same way as
the original bug.
Activity
cameronmurphy commentedon Jun 9, 2026
+1
solominh commentedon Jun 29, 2026
Just polyfill it for future proof:
ChrisJamesC commentedon Aug 18, 2026
Still present on
master(commons/modifiers.ts:460,components/modal/index.tsx:155)and in
9.1.2, the currentlatest.Adding a repro and the full scope, because this is easy to under-rate: it silently
breaks touch handling, not just layout.
Why it's invisible
{...StyleSheet.absoluteFillObject}evaluates to{}on RN >= 0.85. No crash, nowarning, no type error — the style just quietly becomes empty.
Concrete breakage: the
Modalbackdrop, and everything built on itThe backdrop ends up with no
position: 'absolute', no insets and no dimensions —an unpositioned, zero-height, in-flow view.
onBackgroundPresscan thereforenever fire.
Hint— worst affected. It silently switches to aModalwheneveronBackgroundPressis passed (isUsingModal = Boolean(onBackgroundPress && useModal),and
useModaldefaults totrue). The hint becomes an undismissablefull-screen modal, so the entire app appears frozen. Taps on the hint bubble
still work, because
onPressis wired directly to its ownTouchableOpacity—which makes this present as a selective touch/Fabric bug and sends you a very
long way down the wrong path.
Dialog— tap-outside-to-dismiss silently dead.FeatureHighlight— same.Minimal repro on RN >= 0.85 — tap outside the white box, the counter never moves:
The same modal written with
StyleSheet.absoluteFillon the backdrop workscorrectly, which isolates it to the removed API rather than to anything in RN's
renderer.
Scope: 26 occurrences across 20 files
From the published
9.1.2tarball:Two of these reach much further than the rest:
commons/modifiers.js:342—absoluteFill: StyleSheet.absoluteFillObjectbacksthe
absFmodifier, so every component and every consumer app usingabsFsilently gets
{}.components/tabController/TabPage.js:85—page: StyleSheet.absoluteFillObjectleaves TabController pages unpositioned.
Fix
absoluteFillObjectwas only ever an alias. RN'sStyleSheet.jshasabsoluteFillObject: absoluteFill— the same frozen object — unchanged backthrough at least v0.72, v0.76 and v0.79. So a plain rename is safe on every RN
version this library supports, with no compatibility shim needed:
Verified end to end: renaming all 26 occurrences via a Yarn patch restores
Dialog's tap-outside-to-dismiss andHint'sonBackgroundPresson RN 0.86.2 /react-native-ui-lib 9.1.2.
Happy to open a PR with the rename if that's useful.
Note on the polyfill workaround suggested above
StyleSheet.absoluteFillObject = StyleSheet.absoluteFilldoes work, but only if itexecutes before any of this library's modules are evaluated — the affected styles
are all built at module scope via
StyleSheet.create. That makes it dependent onentry-file import order, and when it fails it fails silently, in the same way as
the original bug.