Skip to content

Only send wheel mouse event when scrolling a line or more#3869

Merged
Tyriar merged 2 commits intoxtermjs:masterfrom
pfitzseb:sp/wheel-mouse-event-per-line
Jun 26, 2022
Merged

Only send wheel mouse event when scrolling a line or more#3869
Tyriar merged 2 commits intoxtermjs:masterfrom
pfitzseb:sp/wheel-mouse-event-per-line

Conversation

@pfitzseb
Copy link
Copy Markdown
Contributor

Fixes #3848.

Haven't added a test since all of the mouse event functionality seems to be untested and I'm not sure how to set up the necessary scaffolding.

@pfitzseb
Copy link
Copy Markdown
Contributor Author

Re-using viewport's _wheelPartialScroll isn't technically correct, but shouldn't have any real consequences; the same implementation is used elsewhere too:

const amount = this.viewport!.getLinesScrolled(ev);

@Tyriar Tyriar added this to the 4.19.0 milestone Jun 26, 2022
@Tyriar Tyriar self-assigned this Jun 26, 2022
Copy link
Copy Markdown
Member

@Tyriar Tyriar left a comment

Choose a reason for hiding this comment

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

Looks good, I agree it's not ideal we're using this from Viewport but as you say it's used elsewhere already.

@Tyriar Tyriar merged commit 1a788f6 into xtermjs:master Jun 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wheel event frequency in mouse mode too high when using a touchpad

2 participants