user-event
user-event copied to clipboard
Shift+Arrows does not move the selection as expected
Reproduction example
https://codesandbox.io/s/quizzical-bas-ovqbr9?file=/src/App.test.js
Prerequisites
- Have an input with any contents
- Move so that it's not in the last position
- Press ArrowRight with Shift held down on the Keyboard.
Expected behavior
Arrow movement with the shift key pressed should start a selection, where selection start != selection end.
Actual behavior
Both selection start and selection end move to the right, there is no selection.
User-event version
14.2.0
Environment
+-- @testing-library/[email protected] +-- @testing-library/[email protected] +-- @testing-library/[email protected] +-- [email protected]
Additional context
No response
Thanks for opening an issue on this. It's one of our TODOs:
https://github.com/testing-library/user-event/blob/8215e2eebb13134cd0600cc8a2481725c16cd30d/src/utils/focus/selection.ts#L202-L203