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

feat: Add directional scroll behavior #39

Merged
merged 1 commit into from
Aug 10, 2024
Merged

feat: Add directional scroll behavior #39

merged 1 commit into from
Aug 10, 2024

Conversation

manzt
Copy link
Owner

@manzt manzt commented Aug 9, 2024

This PR both improves scroll behavior and makes it more consistent across environments. Rather than delegating to the parent for handling scroll, we 1.) trap all wheel events and avoid propagation to parent (fixes #27) and 2.) enforce directional scrolling (either vertically or horizontally, but not at the same time).

I wasn't sure about the latter, but after trying it I think it's much nicer. You avoid accidentally scrolling horizontally, for example, when quickly scanning many rows.

@manzt manzt force-pushed the scroll-behavior branch from 9ebc26d to e37479d Compare August 9, 2024 23:57
@manzt manzt changed the title fix: Don't propagate scroll behavior to parent feat: Add directional scroll behavior Aug 9, 2024
@manzt manzt merged commit e2a554c into main Aug 10, 2024
3 checks passed
@manzt manzt deleted the scroll-behavior branch August 10, 2024 00:04
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.

Dual Scrolling in Visual Studio Code
1 participant