-
Notifications
You must be signed in to change notification settings - Fork 41
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
/ key is not handled correctly on Chrome on Linux #27
Comments
/ is not the only key affected. For example [ shows up as U+00DB and ] is U+00DD. |
Additionally, on Windows, [ is reported as U+00DD. |
Due to known bugs[1] use the keyCode instead. [1] PolymerElements/iron-a11y-keys-behavior#27 Change-Id: I61d80d6df5a241968651818324ca266304c9be69
Did some tests, on Chrome Linux the
On Chrome Mac instead
Adding 191 keyCode is not an option, because it would be triggered even if we press |
Closing this issue as it's a platform problem rather than of the behavior. |
Have you filed a Chrome bug for this? Is the problem also present on Firefox Linux? |
I'm confused as to why this bug was closed. Even if the root cause is due to a platform issue, there is surely a problem with iron-a11y-keys-behavior as well. The documented behavior is you put a character as a key in the keyBindings object, you get a key binding for the key that generates that character. If this works only for some characters, then you need to document what subset of characters it works for. And honestly, as an application developer, if I can't count on this library to work for every key I need to handle bindings for, I'm not likely to use it at all. Handling some key events using this behavior and some manually is more conceptual overhead than just handling everything manually. |
This issue happens only on Chrome on Linux and Windows, Firefox already implements @dborowitz |
Surprise surprise: on I'll reopen this issue, I'll update the demo page to use keypress for the special characters ;) |
Ok, closing this again. On Linux the In this test i pressed |
Please re-open this as /cc @garykac |
Hm. On Chrome Canary (52.0.2734.0) @valdrinkoshi will this “just work” once |
|
Correct, the behavior will first try to use |
BTW, for looking at key events, you may want to try: https://w3c.github.io/uievents/tools/key-event-viewer.html You can turn on |
I tried to add a handler for
/
, but iron-a11y-keys-behavior identifies the key asU+00BF
, which is an inverted question mark (https://en.wikipedia.org/wiki/U+00BF). I believe 191 is actually the JS keycode for/
, it's just not getting translated properly.I can reproduce the problem on Chrome 46 on Linux, but not on OS X. Sample code is here:
https://gerrit-review.googlesource.com/#/c/73010/1/polygerrit-ui/app/elements/gr-search-bar.html@85
I tried adding a test to
basic-test.html
like the following:but the whole test suite is failing for me so I must be doing something wrong.
My chrome://version says:
The text was updated successfully, but these errors were encountered: