maxs15 / react-native-modalbox

A <Modal/> component for react-native
MIT License
2.89k stars 505 forks source link

Fix: Glitch Modal with Coverscreen Prop #341

Open rifansyah opened 3 years ago

rifansyah commented 3 years ago

[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

Step

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