Skip to content

Conversation

@TheLizzard
Copy link

@TheLizzard TheLizzard commented Oct 20, 2025

Description

IDLE doesn't have a horizontal scrollbar but that shouldn't stop the user from using their trackpad/touchpad to horizontally scroll the text. This is a small bug that can sometimes annoy people

Previously

If you try to scroll horizontally using a trackpad/touchpad, the text in IDLE would scroll vertically.

Summary of changes

  • Fixed IDLE's scrolling event handling (by respecting the direction embedded in the <tkinter.Event>.state)
  • Added test cases to avoid regression in the future

Testing

I tested the issue and the fix on: Windows 11, Ubuntu 24.04 and Debian 13. The issue appears on all OSes and the fix works on all of them. While I am not 100% sure if this will break on MacOS, I am very confident that there will be no problems.

Fixes #140389

@TheLizzard
Copy link
Author

Sorry for the typos I made in the tests I created and wasting GitHub resources. I was sure I ran them but I must have screwed up. Fixed them now and they should work.

@python python deleted a comment from hsnabrahymhsn62-cmyk Oct 22, 2025
@python python deleted a comment from hsnabrahymhsn62-cmyk Oct 22, 2025
Copy link
Member

@StanFromIreland StanFromIreland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm with manual testing that the patch does implement horizontal scrolling with a touchpad on Unix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IDLE: touchpad horizontal scrolling not working

2 participants