Skip to content

Preview Does Not Stay Synchronized With Editor Scroll #161

@amorenojr

Description

@amorenojr

🐛 Problem

The Markdown preview pane does not consistently stay synchronized with the .md editor when scrolling through the document.

When scrolling through the Markdown source file, the preview pane either:

  • Lags behind the editor scroll position
  • Jumps inconsistently
  • Stops syncing entirely until manual interaction
  • Scrolls to an incorrect relative position

This behavior makes it difficult to use the preview for real-time layout verification, especially in longer documents.

🔁 Steps to Reproduce

  • Ensure "editor.wordWrap" : "on" setting enabled
  • Open an .md file
  • Enable preview to the side (Ctrl+K V)
  • Slowly scroll through the editor pane
  • Observe preview scroll behavior

✅ Expected Behavior

The preview pane should maintain proportional scroll synchronization with the Markdown editor, matching the current visible section of the source file consistently.

❌ Actual Behavior

Scroll synchronization is inconsistent and unreliable. The preview does not accurately track the editor’s scroll position.

📎 Additional Notes

  • Issue occurs on documents longer enough to require scrolling (likely related to heading anchors or scroll percentage mapping).
  • Problem appears specific to vscode-github-markdown-preview-style.

💡 Possible Cause

This may be related to how scroll percentage or anchor mapping is implemented in the extension’s preview rendering logic.

🆚 VS Code Information

  • Version: 1.109.2 (system setup)
  • Commit: 591199df409fbf59b4b52d5ad4ee0470152a9b31
  • Date: 2026-02-10T20:18:23.520Z
  • Electron: 39.3.0
  • ElectronBuildId: 13168319
  • Chromium: 142.0.7444.265
  • Node.js: 22.21.1
  • V8: 14.2.231.22-electron.0
  • OS: Windows_NT x64 10.0.26200

Extension Version

  • bierner.markdown-preview-github-styles-2.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions