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

fix: throttle scroll events #218

Merged
merged 1 commit into from
Feb 2, 2022
Merged

fix: throttle scroll events #218

merged 1 commit into from
Feb 2, 2022

Conversation

NathanLovato
Copy link
Contributor

@NathanLovato NathanLovato commented Jan 31, 2022

This should help fix issues with touchpads firing too many scroll events on some web browsers.

Should fix #114 but needs testing.

This should help fix issues with touchpads firing too many scroll events on some
web browsers
@NathanLovato NathanLovato added this to the 0.3 milestone Jan 31, 2022
@NathanLovato
Copy link
Contributor Author

@Xananax could you test this one and tell me if it helps on Chrome for you? You can control the throttling in SmoothScrollContainer.gd by changing TIME_MSEC_BETWEEN_SCROLL_EVENTS.

@Xananax
Copy link
Contributor

Xananax commented Feb 2, 2022

On chrome, it works perfectly well. On Firefox, I get occasional jumps of about 20px up or down from time to time. It's mainly noticeable while testing, or if someone wants to scroll to bottom very fast. If someone's just reading and scrolling at reading speed, it will seem a bit glitchy sometimes, but it's fine.

I don't think it's worth exploring this glitch, there are too many confounding factors (hardware, performance, javascript event handling, Godot, ...). I deem the current behavior satisfying.

@NathanLovato NathanLovato merged commit 80eead5 into main Feb 2, 2022
@NathanLovato NathanLovato deleted the throttle-touchpad-events branch February 2, 2022 16:49
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.

Scrolling is too fast on some touchpads
2 participants