-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Markdown preview does not scroll to top on new URI #164071
Comments
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.72.2. Please try upgrading to the latest version and checking whether this issue remains. Happy Coding! |
Hey can I get this assigned |
@K0more, no need to have the issue assigned to you. You're welcome to make a PR to fix it if you want. 🙂 |
@dsanders11 I tried digging into the issue and found that because it is an in-place reload of the Preview, the scroll bar tries to get back to its original position after rerendering. Do you recommend opening a new tab for the linked document's preview, that would ideally solve the issue. P.S. I tried setting the cc. @mjbvz |
Hello, I'm new to Open Source development and I was going through the Good First Issue label and figured I could take a crack at this one. I think I have traced the problem back to this section of code, but I'm not sure how to proceed. This is in the file "extensions\markdown-language-features\preview-src\index.ts" It seems the scrollProgress of a preview window is stored in a state variable and when the link is clicked, the scrollProgress is restored using that piece of code. I'm not sure if that is intended behavior, or a bug fix for another issue. Commenting out line 65 actually solves the issue, but again, I am not sure if the line was added for some other bug fix or intended behavior, since the commit message for that line does not specify a bug fix. cc: @dsanders11 |
@dsanders11 i want to fix some of code there. but when i fixed then run complie-web, it's not changed! how can test this point ? i run
|
Reopening since the PR that fixed this had to be reverted: #168224 |
I am on |
@mjbvz - is this fixed now? |
Does this issue occur when all extensions are disabled?: N/A (depends on the built-in markdown extension)
Steps to Reproduce:
Expected Behavior:
The link to the other document should open the new document at the top
Actual Behavior:
The scroll position stays the same, opening the new document at a random spot in that document
Other Information:
This change is probably straightforward to make, but it would break the existing behavior. I'm struggling to imagine why that behavior would be desirable though, so not sure it would actually affect anyone in a meaningful way.
cc @mjbvz
The text was updated successfully, but these errors were encountered: