Skip to content
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

feature request: manually fire click event when keyDown key is enter or spacebar #1054

Open
hmajoros opened this issue Jun 21, 2021 · 0 comments

Comments

@hmajoros
Copy link

per the w3c spec, when a focused element receives a keyDown event with the key Enter or , browsers will construct a native click event on that focused element.

from https://w3c.github.io/uievents/#event-type-keydown:

If the key is the Enter or key and the current focus is on a state-changing element, the default action MUST be to dispatch a click event, and a DOMActivate event if that event type is supported by the user agent (refer to § 3.5 Activation triggers and behavior for more details)

this issue is to request that ember-test-helpers follows the same pattern by modifying the triggerKeyEvent helper to also fire a click event in the cases described above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant