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

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

Merged
merged 2 commits into from
Jun 26, 2022

Conversation

pfitzseb
Copy link
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
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
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.

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