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

Arrow keys don't jump to ends of mouse-created selections extending to either end #1074

Open
pushfoo opened this issue Mar 17, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@pushfoo
Copy link
Contributor

pushfoo commented Mar 17, 2024

Summary

TL;DR: If you click-drag to either end of a text input's contents in either direction, the opposite direction's arrow key won't jump & end the selection as expected.

It's unclear whether this is platform specific, but it's in the left / right arrow key selection response behavior as described in #932.

Selections created with shift + arrow keys work as expected.

EDIT: Discord discussion with @caffeinepills + further tests suggest the following may be happening:

  1. The cursor falls out of the text box's bounds
  2. The text box lose focus
  3. The selection is left in an indeterminate state
  4. The arrow keys fail to work as expected

Versions affected

Tip of master + anything after #1072

Platform info

Linux, Debian 11.
Python 3.9.2
Gnome on Wayland with XWayland

Reproduction steps

Left Arrow Key

  1. Launch examples/gui/widgets.py
  2. Left-click anywhere before the end of the text
  3. Drag the cursor rightward to the very end, making sure to include the last character
  4. Release the left mouse button
  5. Press the left arrow key
  6. Observe:
    • The cursor has not moved
    • The selection has not been deselected

Right Arrow Key

  1. Launch examples/gui/widgets.py
  2. Left-click anywhere after the start of the text
  3. Drag to cursor the very start, making sure to include the first character
  4. Release the left mouse button
  5. Press the right arrow key
  6. Observe:
    • The cursor has not moved
    • The selection has not been deselected
@pushfoo pushfoo added the bug Something isn't working label Mar 17, 2024
@sabadam32
Copy link

@pushfoo tried this on Windows 10 and did not see the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants