thorium-reader icon indicating copy to clipboard operation
thorium-reader copied to clipboard

Unfocusing Arrow Keys when Transitioning to Other Chapters

Open psygo opened this issue 2 years ago • 6 comments

Something related to what I had described in #1675 is still happening. This specific behavior is a lot more subtle. So far, what I've been able to reproduce reliably is:

  1. Use arrow keys to go forward (paginated mode)
  2. When there is a transition to another chapter, the arrow key loses focus — if they had been clicked recently, focus is even outlined as a square outlined with blue. This does not impact behavior immediately though, surprisingly.
  3. Then, if you change into another program — alt + Tab for example — the arrow keys no longer work, manually clicking is necessary for them to get back focus and work again, which also gives back the square outlined in blue.

Here is a demo:

https://user-images.githubusercontent.com/11823725/172071177-3b55444a-bece-44f0-9213-f7cdb7ff1c53.mp4

psygo avatar Jun 05 '22 21:06 psygo

Hello thank you very much for taking the time to file this issue (and for creating a screencast that demonstrates the problem). I too am able to reproduce the loss of keyboard shortcuts when ALT-TAB between operating system windows (I am on Apple Mac, so this must be a consistent cross-platform behaviour related to how Electron and its inner webview handles keyboard focus and capture). As for the arrow buttons in the lower right corner of the application's user interface, I think this is a completely separate bug, in the sense that Thorium intentionally redirects keyboard focus when navigating via the table of contents or other hyperlinking mechanism, but the application shouldn't move focus away from the arrow buttons when "turning pages". I will look into this.

danielweck avatar Jun 06 '22 10:06 danielweck

I've also noticed recently that, for example, the act of resizing it and snapping it to one of the extremities on the screen (auto-max width or height on Windows), takes the focus into apparently the first HTML element on Thorium's page/screen. So I guess basically any action on Thorium is triggering a focus effect for some reason?

psygo avatar Jun 12 '22 01:06 psygo

@danielweck , so what it the status on this peculiar bug? I am still battling this with version 2.3 and it is quite annoying as I take lots of notes while reading an EPUB, switching back and forth between the EPUB and my notetaking app... The fact that I must use the mouse every time I go back to the EPUB will soon cause me to have tendonitis!

PhilippeBruno avatar Oct 04 '23 13:10 PhilippeBruno

Hello, just a quick message to let you know that following a significant GUI refactoring that changes how keyboard focus is trapped (specifically relevant to this issue: in popup or docked dialogs / interactive UI panels), we are testing for regressions and also checking the implications for screen reader users who got used to being redirected automatically into the publication HTML when using the Table Of Contents, or bookmarks, page list navigator, etc.

danielweck avatar Apr 26 '24 20:04 danielweck

Hello, just a quick message to let you know that following a significant GUI refactoring that changes how keyboard focus is trapped (specifically relevant to this issue: in popup or docked dialogs / interactive UI panels), we are testing for regressions and also checking the implications for screen reader users who got used to being redirected automatically into the publication HTML when using the Table Of Contents, or bookmarks, page list navigator, etc.

When should we download the new version and take it for a test drive? It is not clear from your message if you are testing internally for regressions or hoping others join to test.

PhilippeBruno avatar Apr 26 '24 20:04 PhilippeBruno

It's internal testing at the moment but the automated Thorium builds from the latest codebase in the develop branch are available if you would like to give the updated GUI a try.

danielweck avatar Apr 26 '24 20:04 danielweck