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

Autocomplete issue with "(" and "&" characters #182

Open
tamsler-valtech opened this issue Sep 1, 2021 · 1 comment
Open

Autocomplete issue with "(" and "&" characters #182

tamsler-valtech opened this issue Sep 1, 2021 · 1 comment

Comments

@tamsler-valtech
Copy link

tamsler-valtech commented Sep 1, 2021

Expected Behavior

A user can enter the characters:

  • "(": Open parenthesis
  • "&": Ampersand

Actual Behavior

These keys work as arrow down "(" and arrow up "&". The reason is this:

  • In Ascii, 38 decimal represents ampersand, whereas the keyCode on KeyboardEvents is arrow up
  • In Ascii, 40 decimal represents open parenthesis, whereas the keyCode on KeyboardEvents is arrow down

https://www.ascii-code.com/
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode

Reproduce Scenario (including but not limited to)

Using a Swiss German keyboard layout, add an Coral.Autocomplete field with some items and try to enter either "(" or "&" in the text field. If you have a suggestion list, these keys will navigate up and down the list.

The exact line of code responsible for this:

comboListeners = this._keyListeners[event.key.charCodeAt(0)];

This also happens in AEM 6.5.8 and probably all 6.5 versions.

@ValtechDeBruyneYves
Copy link

Thanks for the Analysis. I was also able to reproduce this on cloud-210600, so it affects AEM Cloud installations as well.

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

2 participants