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

scroll list view on keyboard focus #232644

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

scroll list view on keyboard focus #232644

wants to merge 22 commits into from

Conversation

meganrogge
Copy link
Contributor

@meganrogge meganrogge commented Oct 30, 2024

@meganrogge meganrogge requested a review from roblourens October 30, 2024 17:57
@meganrogge meganrogge marked this pull request as draft October 30, 2024 17:57
@meganrogge meganrogge self-assigned this Oct 30, 2024
@meganrogge meganrogge added this to the November 2024 milestone Oct 30, 2024
@meganrogge meganrogge changed the title scroll on keyboard focus scroll chat list on keyboard focus Oct 30, 2024
@roblourens
Copy link
Member

Looks great, but it looks like it's scrolling even when tabbing to something inside the viewport? I don't think it should do that, and it would still scroll when clicking buttons and things, I think

@meganrogge
Copy link
Contributor Author

meganrogge commented Oct 31, 2024

Crux of the issue: scrollTop and y are wrong for elts below the viewport

@meganrogge meganrogge marked this pull request as ready for review November 1, 2024 04:07
@meganrogge meganrogge enabled auto-merge (squash) November 1, 2024 04:09
@meganrogge meganrogge marked this pull request as draft November 1, 2024 04:29
auto-merge was automatically disabled November 1, 2024 04:29

Pull request was converted to draft

@meganrogge meganrogge marked this pull request as ready for review November 1, 2024 21:21
@meganrogge meganrogge modified the milestones: November 2024, January 2025 Dec 2, 2024
@meganrogge meganrogge enabled auto-merge (squash) January 8, 2025 22:17
@meganrogge meganrogge changed the title scroll chat list on keyboard focus scroll list view on keyboard focus Jan 8, 2025
@@ -480,6 +479,8 @@ export class ListView<T> implements IListView<T> {
}

private _scrollToActiveElement(element: HTMLElement, container: HTMLElement) {
// The scroll event on the list only fires when scrolling down.
// If the active element is above the viewport, we need to scroll up. microsoft/vscode-copilot#9357
Copy link
Member

Choose a reason for hiding this comment

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

IMO we shouldn't refer to issues in private repos in the OSS repo

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.

3 participants