zotero / reader

PDF/EPUB/HTML reader for Zotero
Other
129 stars 30 forks source link

Reader context menu keyboard navigation #139

Closed abaevbog closed 1 month ago

abaevbog commented 2 months ago

Fixes: https://github.com/zotero/zotero/issues/4681

Also, fixed an encountered glitch where clicking inside of the rendered reader content when the context menu is open would make the annotation un-selectable via tab.

Currently, getting into the menu or navigating it with keyboard is not possible. For comparison, this is the updated behavior. In the end, i type "gre" to get the "Green" option selected.

https://github.com/user-attachments/assets/4cb607f8-418b-4a43-994f-ae83b6e0816f

mrtcode commented 1 month ago

Sorry, I forgot that context menu navigation was working in the initial Reader 2.0 version. Let's see if we can add those extra features from this PR.

abaevbog commented 1 month ago

Yeah, I'll revise this to just keep the last bullet point from the initial description

As well as that glitch fix I ran into

abaevbog commented 1 month ago

I just revised this to only keep the menuitem selection by typing.

abaevbog commented 1 month ago

Oh, on a separate note, I just noticed that when a context-menu is opened, subsequent Escape keypress not only closes the contextmenu but also re-focuses the rendered content iframe. We probably want to treat Escape as a special case here so it only closes the contextmenu and refocuses the context-menu button?

mrtcode commented 1 month ago

Oh, on a separate note, I just noticed that when a context-menu is opened, subsequent Escape keypress not only closes the contextmenu but also re-focuses the rendered content iframe. We probably want to treat Escape as a special case here so it only closes the contextmenu and refocuses the context-menu button?

We can create a separate issue for that.

mrtcode commented 1 month ago

Ok, looks good. We can merge.