Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions extensions/markdown-language-features/preview-src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ window.addEventListener('message', async event => {
const newBody = newContent.querySelector('.markdown-body')!;
root.replaceWith(newBody);
domEval(newBody);
// Scroll to top when navigating to a different document
window.scrollTo(0, 0);
} else {
const newRoot = newContent.querySelector('.markdown-body')!;

Expand Down
Loading