CoinWatch icon indicating copy to clipboard operation
CoinWatch copied to clipboard

Back button doesn't work if search tab is opened

Open martyniukkk opened this issue 1 year ago • 1 comments

When I open search tab and click back button - nothing happens

https://github.com/user-attachments/assets/6df65c7c-45e4-4817-8b79-26d2fe1258ba

martyniukkk avatar Dec 28 '24 21:12 martyniukkk

Hi @martyniukkk, thanks for raising this issue. I've taken a look at this and it turns out the SearchBar() composable I've used in this screen that is provided in the Compose standard library overrides the back button using a BackHandler. I've tried overriding this with an onNavigateUp() call but it seems that the bottom navigation bar somehow blocks this solution from working.

The combination of a SearchBar inside of a bottom navigation bar seems to be an unhandled interaction that has this bug. Aside from rewriting the search screen to no longer use the SearchBar() composable I'm unsure how else this could be solved 🤔

shorthouse avatar Jan 03 '25 12:01 shorthouse