[navigation-material] Sometimes bottom sheet entry not correctly popped when dismissed by user
See original GitHub issueDescribe the bug
Sometimes when the user dismiss the bottom sheet, it pops up again.
https://user-images.githubusercontent.com/9391933/132286583-4858b9f9-d859-414f-bc3c-8849d2a71e3d.mp4
To Reproduce
The official example is enough to reproduce this.
Findings
It seems that the first time we navigate to a bottom sheet entry, the sheetState.show()
call is always canceled, but sheetState.targetValue
is Hidden
, so currentOnSheetShown(backStackEntry)
which marks the transition completed is not called. However, the bottom sheet does pop up after that, making the internal and external states inconsistent, which eventually results in the behavior described above.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Question: Dismiss bottom sheet programmatically? · Issue #864
When you want to close the bottom sheet, you can pop the back stack entry or navigate to the destination you want to...
Read more >How to Move bottomsheet along with keyboard which has ...
BottomSheet - has the maxHeight: constraints as the Fields are Increasing height won't increase. You can use ListView in BottomSheet to make fields...
Read more >iOS 14 (SwiftUI) Sheet Modals not … | Apple Developer Forums
Sometimes (most of the time) I have to kill the app because the modal is not dismissed and I cannot go back to...
Read more >Compose Destinations: simpler and safer navigation in ...
In this post, I will go through the advantages of using it, and, if all goes well, show you that it is worth...
Read more >Menus - Android Developers
Actions in a popup menu should not directly affect the corresponding content—that's what contextual actions are for. Rather, the popup menu is ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@rubenquadros12 Please excuse the delay - I’m working on a fix but I don’t have an estimate yet. I’m hoping for it to be released next week. I will update as soon as I make progress on the fix!
That’s obviously a bug, I’ve updated my post as I see that it could be understood differently as I’ve intended. Just wanted to provide some extra info for the bug and I didn’t express it well.