viewer
viewer copied to clipboard
Navigating via keyboard and opening photos, Viewer does not take focus, and resets focus to beginning of Files list after closing
Describe the bug When navigating via keyboard and opening a photo with the viewer, the tab focus is not taken correctly. That is, it still remains in the same spot as before in the file list or photo list even though the viewer is open. That leads to being able to navigate through photos with left/right arrow keys and being able to exit using esc, but you can not activate the slideshow or open the sidebar from this view.
Then when you exit the Viewer using Esc, the Tab position is reset to the top of the Files list which is also not expected.
@skjnldsv noted in addition:
We would need to restore the focus on the initial element that had it before, might be tricky, we never did that! :)
To Reproduce Steps to reproduce the behavior:
- Go to Files
- Start using
Tabon your keyboard to go through entries (you can use the "Skip to content" link) - Open a photo via Enter
- Exit the Viewer via Esc
- Be reset to the top of the Files list
Expected behavior When you open the Viewer, the first focusable element of the viewer is focused, and when you exit it, the last focused element is remembered so you can easily continue.
(Question would be if it remembers the last focused element before the Viewer was opened, or if focuses the file which was last open in the Viewer – just in case images were navigated using the Viewer.)