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
ui-native: a kept-alive child stops receiving presses after it's placed again #552
A child written with h.keepAlive renders again after it's been parked, but its views no longer respond to presses. Elements that never left the tree keep working.
Seen on iOS (Expo Go 58, React Native 0.88.1) with @effect/ui and @effect/ui-native at 22128c6.
Switch to "Other tab", then back to "Counter tab".
Press the same button: nothing happens. The tab buttons still work.
TestHost and FakeFabric don't reproduce it.
Cause
The kept child comes back under its old tags, so Fabric mounts the same shadow node families again. When those families unmounted, Fabric released their event targets (ShadowNode::setMounted(false) → EventEmitter::setEnabled, which calls eventTarget_.reset()), and mounting them again doesn't restore them. Events from those views never reach the handler registered with registerEventHandler.
Related: #519 handles kept children for animations, but not this.
Activity