[v4] Backdrop does not disappear completely #849
Unanswered
yolpsoftware
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a Bottom Sheet Modal with custom backdrop and a "Done" button at the bottom. Both the backdrop and the button call
useBottomSheetModal().dismiss()
when touched.However, for some strange reason, only the backdrop manages to completely dismiss the modal. When the button is pressed, the modal disappears, but afterwards the whole UI is blocked because the backdrop still overlaps it. The backdrop now has an opacity of
0.0
, so it is not anymore visible, but it is still there and blocks the UI.I have spent more than three hours trying to solve or isolate the problem, but it just makes no sense. As soon as I remove too much code, the problem disappears, but I have not found the exact part that causes it.
To at least mitigate the problem, I added a translation interpolation to the backdrop: when its opacity goes to 0, it is also scaled to a size of 0. So now it does not anymore block the UI, but now it seems the modal cannot be shown again. When I call
.present()
on the modal, it does not show again.I don't know where to research further. I call the exact same method, but depending on where it is called from, it does something else.
Before I lose more time, maybe someone has encountered a similar issue? How can the modal get into a state which prevents a call to
.present()
from working?Thanks for any hints!
Beta Was this translation helpful? Give feedback.
All reactions