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.
Expected Behavior
A user can enter the characters:
Actual Behavior
These keys work as arrow down "(" and arrow up "&". The reason is this:
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:
coral-spectrum/coral-utils/src/scripts/Keys.js
Line 385 in 9e2cc7f
This also happens in AEM 6.5.8 and probably all 6.5 versions.