Skip to content

fix(android): keep a closing sheet from reopening - #205

Open
fkrzski wants to merge 1 commit into
NativePHP:mainfrom
fkrzski:fix/android-sheet-reopening
Open

fkrzski wants to merge 1 commit into
NativePHP:mainfrom
fkrzski:fix/android-sheet-reopening

Conversation

@fkrzski

@fkrzski fkrzski commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

On Android, a bottom sheet whose detents changed in the same render that set visible to false opened again, empty, at its partial stop, and once swiped away its window stayed over the app and swallowed every touch. rememberModalBottomSheetState is keyed on skipPartiallyExpanded, so the new detents made a new SheetState; ModalBottomSheet shows every new state, and that show() cancelled the renderer's hide() before shown = false ran. A closing sheet now keeps the detents it opened with, and shown turns false even when hide() is cancelled, which also covers a finger grabbing the sheet as it slides away. Checked on an Android 14 device and with a new Robolectric test in tests/android, since CI does not build Kotlin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant