-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Setting [hotkeys] on a button only activates hotkey if focused on the button #35
Comments
You're welcome to create a PR |
What's your preferred way to solve this from what I suggested? |
Can you elaborate on the suggested solutions, please? |
It comes down to two ways:
|
I'm OK with adding both. The latter isn't a breaking change. |
When you say both, do you mean Both or Either? 😅 |
Both |
NP. Thanks for the availability 👍🏻 |
Hi! What is the progress on this one? I would really like this feature. Can I help in some way? |
I'm submitting a...
Current behavior
I have a form with a bunch of buttons, much like the one above. Long as the form is open, I want the hotkey defined on each button to perform the action of the button. At first, I didn't have the
(hotkey)
handler, since I assumed it would invoke the(click)
handler, but then I looked at the docs and added the(hotkey)
handler, but it still didn't work.The culprit is this piece of code setting the
element
option without being allowed to override it. I would want to set it as "document.documentElement", for example.Expected behavior
When I set a hotkey on an element, I want to be able to have the hotkey work without having the element be focused.
Perhaps it can be an input flag of the directive, changing the
...hotkeys
to happen after settingelement
to be the host element.Minimal reproduction of the problem with instructions
See example in "Current Behavior"
What is the motivation / use case for changing the behavior?
I want to easily set hotkeys for buttons for the duration the button lives. Moreover, I want to not have to use
HotkeysService
directly to force theelement
to bedocument
.Environment
The text was updated successfully, but these errors were encountered: