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

Shift+Arrows does not move the selection as expected #966

Open
edave64 opened this issue Jun 3, 2022 · 1 comment
Open

Shift+Arrows does not move the selection as expected #966

edave64 opened this issue Jun 3, 2022 · 1 comment
Labels
accuracy Improves the accuracy of how behavior is simulated

Comments

@edave64
Copy link

edave64 commented Jun 3, 2022

Reproduction example

https://codesandbox.io/s/quizzical-bas-ovqbr9?file=/src/App.test.js

Prerequisites

  1. Have an input with any contents
  2. Move so that it's not in the last position
  3. 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/dom@8.13.0
+-- @testing-library/jest-dom@5.16.4
+-- @testing-library/user-event@14.2.0
+-- jest-environment-jsdom@28.1.0

Additional context

No response

@edave64 edave64 added bug Something isn't working needs assessment This needs to be looked at by a team member labels Jun 3, 2022
@ph-fritsche
Copy link
Member

Thanks for opening an issue on this. It's one of our TODOs:

export function moveSelection(node: Element, direction: -1 | 1) {
// TODO: implement shift

@ph-fritsche ph-fritsche added accuracy Improves the accuracy of how behavior is simulated and removed bug Something isn't working needs assessment This needs to be looked at by a team member labels Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accuracy Improves the accuracy of how behavior is simulated
Projects
None yet
Development

No branches or pull requests

2 participants