-
Notifications
You must be signed in to change notification settings - Fork 4
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
Glitchy scrolling with (touchpad emulated) mouse wheel #10
Comments
That's weird, I cannot replicate it, is there anymore details to recreate it? Does it work on different terminals? |
Arch Linux. Don't really know what's relevant. It's present in all combinations of the following that I've tried:
I'm scrolling with a touchpad. Maybe it's a hardware issue. I know some touchpads report scroll behavior differently from the wheel on a mouse. Sorry for inaccurate description. Have edited to clarify. |
Tested with an external mouse. Same problem.
Occasionally, the glitchy scrolling does not occur, but far more often it does. (Out of all testing so far, only 2-3 times it was not glitchy.) |
I was poking around in the code and found this: contents.py (L158-L162): def on_mouse_scroll_down(self, _: events.MouseScrollDown) -> None:
self.screen.scroll_down()
def on_mouse_scroll_up(self, _: events.MouseScrollUp) -> None:
self.screen.scroll_up() Changing it to the following (based on Textual: widget.py) corrects the scrolling behavior: def on_mouse_scroll_down(self, _: events.MouseScrollDown) -> None:
if self._scroll_down_for_pointer(animate=False):
event.stop()
def on_mouse_scroll_up(self, _: events.MouseScrollUp) -> None:
if self._scroll_up_for_pointer(animate=False):
event.stop() |
Switching to |
Did some more testing.
|
Using (touchpad emulated) mouse wheel to scroll with current git checkout (6318c71). Looks like the scroll overshoots a little then bounces back, on each line. Does not occur with
epy
.The text was updated successfully, but these errors were encountered: