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 console scrolling for web #5439

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

timtmok
Copy link
Contributor

@timtmok timtmok commented Nov 21, 2024

Address #2056

VS Code drops the wheel scroll event to prevent gesture navigation. This listens to the event on the top level element in the console and forwards the scroll to the parent container.

The fix also didn't seem to affect desktop but it seems safer to add an isWeb check.

I suspect there may be other places that have this problem too. Going forward, it might be better to try to use the Scrollable component that uses VS Code's scrollable code and that would hopefully avoid this bug. However, Scrollable needs to know the container dimensions and the content dimensions to properly size the scroll bar.

QA Notes

I tested locally with a trackpad but the event should also be triggered for a standard mouse wheel to fix the scrolling.

Listen to console container scroll and forward event to parent container
Copy link
Member

@sharon-wang sharon-wang left a comment

Choose a reason for hiding this comment

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

LGTM in a dev build of Server Web on Mac 👍

Agree it would be nice to swap in Scrollable in all the places where we've made a similar fix. Do you mind opening an issue to collect the places where we could make this improvement?

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.

2 participants