Reproduction example
https://codesandbox.io/s/userevent-keyboard-modifiers-gt0n61?file=/src/App.test.js
Prerequisites
- Render and focus element
- Press modifer and other keys
Expected behavior
Modifiers like [ShiftLeft] switch on the appropriate modifier state before keydown and switch off the modifier state before keyup.
Modifier locks like [CapsLock] switch on the modifier state after the keydown and turn off the the modifier state after keyup.
Actual behavior
Shift modifier state is not applied. (shiftKey is applied correctly.)
CapsLock modifier state is switched like a non-lock key.
User-event version
14.3.0
Environment
Testing Library framework:
JS framework:
Test environment:
DOM implementation:
Additional context
No response
Reproduction example
https://codesandbox.io/s/userevent-keyboard-modifiers-gt0n61?file=/src/App.test.js
Prerequisites
Expected behavior
Modifiers like
[ShiftLeft]switch on the appropriate modifier state beforekeydownand switch off the modifier state beforekeyup.Modifier locks like
[CapsLock]switch on the modifier state after thekeydownand turn off the the modifier state afterkeyup.Actual behavior
Shiftmodifier state is not applied. (shiftKeyis applied correctly.)CapsLockmodifier state is switched like a non-lock key.User-event version
14.3.0
Environment
Testing Library framework:
JS framework:
Test environment:
DOM implementation:
Additional context
No response