ai / keyux

JS library to improve keyboard UI of web apps
https://ai.github.io/keyux/
MIT License
391 stars 18 forks source link

Demo: `Esc` hides focus instead of returns it back #32

Open uzurpastor opened 1 month ago

uzurpastor commented 1 month ago

OS: Fedora 40 Browser: Firefox 128.0, Chromium 126.0

It seems to me that incorrect behaviour is taking place here. When the Esc key is pressed, the focus does not return to the body of the first element.

But I'm sure this may depend on the specific use case, so I have an idea to provide both behaviours via some "configuration" variables, if the current lib implementation makes it easy to implement this.

ER:

AR:

Screencast:

https://github.com/user-attachments/assets/418494a8-732b-43b3-bc24-8e17bc4a2c96

ai commented 1 month ago

Yes, we can improve behavior here. But PR is needed. I do not need this behavior for myself but will accept changes from somebody else.

uzurpastor commented 1 month ago

Great! I take a look on it.