Open computerjazz opened 11 months ago
upon further exploration, it seems like this issue isn't constrained to react-navigation (I updated OP to reflect this)
Also seeing this :/
Also having this problem :/ any updates?
Also having this problem but slightly different, but still :
// Doesn't work
<>
<View style={[StyleSheet.absoluteFill, { backgroundColor: 'orange' }]} />
{show && (
<Animated.View
entering={FadeIn.duration(1000)}
exiting={FadeOut.duration(1000)}>
</Animated.View>
)}
</>
// Is working if absolute view doesn't have backgroundColor
<>
<View style={StyleSheet.absoluteFill} />
{show && (
<Animated.View
entering={FadeIn.duration(1000)}
exiting={FadeOut.duration(1000)}>
</Animated.View>
)}
</>
// Is working if animated view is wrapped with absolute view
<>
<View style={[StyleSheet.absoluteFill, { backgroundColor: 'orange' }]} />
<View style={StyleSheet.absoluteFill}>
{show && (
<Animated.View
entering={FadeIn.duration(1000)}
exiting={FadeOut.duration(1000)}>
</Animated.View>
)}
</View>
</>
// Is working if absolute view doesn't have backgroundColor
Seems like element with absolute position overlaps the one you animate when exit animation happens (this can be proved by setting opacity 0.5 to absolute positioned one).
Alternative solution is also set zIndex
for Animated.View to force showing it above absolute positioned element
@Szymon20000 can you elaborate on how element is positioned once exiting animation start, to understand how to fix such issues
Description
In Expo 49 iOS (dev-client and snack), exiting animations are broken for layout animations rendered as a sibling of an absolutely-positioned element, unless wrapped in an additional view.
Does not animate on exit:
Animates correctly on exit:
(Possibly related,
Animated.View
s that are rendered as siblings to a react-navigation navigator also fail to animate)Steps to reproduce
Snack or a link to a repository
https://snack.expo.dev/@easydan/layout-animation-exiting-ios-bug-2
Reanimated version
3.3.0
React Native version
0.72.3
Platforms
iOS
JavaScript runtime
Hermes
Workflow
Expo Dev Client
Architecture
Paper (Old Architecture)
Build type
Release mode
Device
iOS simulator
Device model
No response
Acknowledgements
Yes