Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remember button focus on details screen #2345

Merged
merged 1 commit into from
Dec 17, 2022

Conversation

teobaranga
Copy link
Contributor

Changes
Reworked #2297 in way that does not cause regressions.

The previous implementation added a global focus listener that worked even if the buttons row was offscreen. The linked bug happened because a "last button" was stored when navigating to the movie screen and then when navigating to the person screen, that same button would request focus even if was offscreen. Detaching the listener when navigating between screens was not sufficient because it would always be called too late, ie. after the incorrect focus request happened. TIL global focus listener is very dangerous.

The rework involves a targeted focus listener for each button which does not operate while offscreen. The last focused button is only stored when navigating away from the buttons row, and only restored when coming back to that same row.

Issues
N/A

@nielsvanvelzen nielsvanvelzen added the enhancement New feature or request label Dec 17, 2022
@nielsvanvelzen nielsvanvelzen added this to the v0.15.0 milestone Dec 17, 2022
@nielsvanvelzen
Copy link
Member

Thanks for the quick rewrite, I wasn't able to reproduce the previous issue and everything works as expected!

@nielsvanvelzen nielsvanvelzen merged commit c1c6cd1 into jellyfin:master Dec 17, 2022
@teobaranga teobaranga deleted the remember_button branch December 18, 2022 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants