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 search editor scrolled to bottom on first search when editor group changed. #134693

Merged
merged 2 commits into from
Oct 26, 2021

Conversation

ssigwart
Copy link
Contributor

@ssigwart ssigwart commented Oct 9, 2021

This PR fixes #134686

I'm not sure it's the best solution, but this solves it.

@JacksonKearl
Copy link
Contributor

Thanks! Looking into this it seems the real culprit was failing to await the write of the results to the model before setting the view's scroll position, which meant when the contents did come in it tried to insert them "before" the existing scroll position, resulting in the document scrolling to the bottom. It's not clear to me why this only affected editors after they've been moved, perhaps something to do with the view state being stored on a per-group basis.

@JacksonKearl JacksonKearl merged commit e16defc into microsoft:main Oct 26, 2021
@ssigwart ssigwart deleted the searchScroll branch October 27, 2021 02:02
@ssigwart
Copy link
Contributor Author

Thanks. That's a much cleaner solution!

@github-actions github-actions bot locked and limited conversation to collaborators Dec 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Search Editor is Scrolled to the Bottom if Moved to a Different Editor Group
2 participants