Fix: Glitch Modal with Coverscreen Prop
[Fix: Glitch Modal with Coverscreen Prop]
What is going on?
Our modal (ex: BreakTimeModal) sometimes glitches after closed if we use coverScreen props.
This glitch is mostly happen in ios
Level: {medium} the glitch makes our app looks unstable for the user.
How to reproduce?
Condition
- using coverScreen props
- modal with heavy content
Step
- open modal
- close modal
Caused by
this glitch doesn't only happen in modalbox library, but also react-native-modal (issue #1, #2) then fixed by this PR by peteroid. in the other hand, react-native-modalbox seems haven't fixed it yet.
if we refer to those issues, the glitch happens because the modal content is too complex for post-animation process.
Resolved by
we tried to fork react-native-modalbox and do same thing as the PR by peteroid in react-native-modal.
the main idea is to hide/not render the content right after the animation is complete. in that way, the modal has no complex content at all to cause the glitch