-
Notifications
You must be signed in to change notification settings - Fork 820
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
add 1..9 hotkeys #689
add 1..9 hotkeys #689
Conversation
} | ||
|
||
codeClipboard.value = | ||
instance.$store.state.accounts.entries[index - 1].code; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
index here could be zero, and index - 1
could be -1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instance.$store.state.accounts.entries
could not be shown by sort of the index in UI. Some accounts may be pinned, some accounts may be filtered.
Here's how are entries rendered: https://github.com/Authenticator-Extension/Authenticator/blob/dev/src/components/Popup/MainBody.vue#L26-L40
That’s true.
|
👍🏻
|
document.activeElement?.nodeName === "INPUT" || | ||
document.activeElement?.nodeName === "TEXTAREA" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if there's a better way to handle this. But obviously, editable div
is not included, and read-only input, read-only textarea, radio and checkbox are not excluded.
Right. Maybe stopPropagation on each input?
|
The sample code is not awesome, but it works: https://jsbin.com/vevovuyefu/edit?html,js,console,output |
Closing in favor of #691 Feel free to reopen this PR if you believe it is closed by mistake. |
This PR adds a keyboard shortcut to copy one of the codes.
Open the popup, hit 1, 2, ... 9 to copy the first, second, etc... codes that are listed.