-
-
Notifications
You must be signed in to change notification settings - Fork 769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes backdrop flash when content height is increasing #562
base: v2
Are you sure you want to change the base?
Conversation
This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
@gorhom commenting as soon as this is still mergeable |
i will look into this pr this weekend, thanks for submitting it @somebody32 |
@gorhom ping |
1 similar comment
@gorhom ping |
I still have this problem in the latest version (v4). If I have multiple bottom sheets inside a screen and a TextInput not inside any of the bottom sheets blurs, the animated index changes for a split second and the backdrop flashes. Any ideas? @somebody32 |
@somebody32 anyway to integrate this fix till it gets merged? |
This PR is way out of date and should probably be closed. |
Motivation
This PR fixes #436.
The culprit of the issue was a sudden drop in
animatedIndex
because of the height change, so the approach is to detect if theanimatedIndex
achieved max value already (ie backdrop appeared fully) and then interpolate only ifanimatedIndex
values start to decrease.Another important topic is how to render the backdrop itself. The doc suggests something like that:
which, surprisingly, causes flicker sometimes because react unmounts and mounts the backdrop on height changes. The fix is to add
key
prop:Video
bottom_sheet_fix.mp4