diff --git a/app/src/main/kotlin/com/arflix/tv/ui/screens/search/SearchScreen.kt b/app/src/main/kotlin/com/arflix/tv/ui/screens/search/SearchScreen.kt index 990a19969..6f230ab29 100644 --- a/app/src/main/kotlin/com/arflix/tv/ui/screens/search/SearchScreen.kt +++ b/app/src/main/kotlin/com/arflix/tv/ui/screens/search/SearchScreen.kt @@ -167,14 +167,13 @@ fun SearchScreen( when (event.key) { Key.Back, Key.Escape -> when (focusZone) { FocusZone.RESULTS -> { - if (showFilters) focusZone = FocusZone.FILTERS - else { focusZone = FocusZone.SEARCH_INPUT; searchFocusRequester.requestFocus() } + // Directly return to sidebar/topbar from results for expected back behavior + focusZone = FocusZone.SIDEBAR true } FocusZone.FILTERS -> { focusZone = FocusZone.SEARCH_INPUT; searchFocusRequester.requestFocus(); true } FocusZone.SEARCH_INPUT -> { - // If we have search results, go back to results instead of sidebar - // This fixes the issue where back from details goes to keyboard instead of results + // If we have active results, go back to results. Otherwise go to sidebar. if (activeCategories.isNotEmpty() || hasAiResults) { focusZone = FocusZone.RESULTS currentRowIndex = 0 diff --git a/app/src/main/kotlin/com/arflix/tv/ui/screens/watchlist/WatchlistScreen.kt b/app/src/main/kotlin/com/arflix/tv/ui/screens/watchlist/WatchlistScreen.kt index 229ef0ec4..6ae07797a 100644 --- a/app/src/main/kotlin/com/arflix/tv/ui/screens/watchlist/WatchlistScreen.kt +++ b/app/src/main/kotlin/com/arflix/tv/ui/screens/watchlist/WatchlistScreen.kt @@ -162,7 +162,8 @@ fun WatchlistScreen( } Key.DirectionLeft -> { if (!isSidebarFocused) { - true + // Let the grid handle left movement within items. + false } else { if (sidebarFocusIndex > 0) { sidebarFocusIndex = (sidebarFocusIndex - 1).coerceIn(0, maxSidebarIndex) @@ -177,6 +178,7 @@ fun WatchlistScreen( } true } else { + // Let the grid handle right movement within items. false } }