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

Allow a MockInteractions.pressAndReleaseKeyOn alternative that takes a keyIdentifier #33

Open
andybons opened this issue Dec 1, 2015 · 0 comments

Comments

@andybons
Copy link

andybons commented Dec 1, 2015

MockInteractions.pressAndReleaseKeyOn(element, 221); // ']'

Will fail because the custom event doesn’t have a keyIdentifier and the keyCode lies outside of what is present in KEY_CODE within https://github.com/PolymerElements/iron-a11y-keys-behavior/blob/master/iron-a11y-keys-behavior.html

A workaround for now has been to create my own function pressAndReleaseKeyIdenfitifierOn(element, '\U+005D') which sets the keyIdentifier which is then recognized by iron-a11y-keys-behavior via transformKeyIdentifier.

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

No branches or pull requests

2 participants