-
Notifications
You must be signed in to change notification settings - Fork 255
Closed
Labels
Description
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
iamskok and itspectre