Skip to content

Preview diagram scrolls off window too aggressively #118

@renet10

Description

@renet10

I have the attached diagram. When I put the cursor towards the end of the code, the entire mermaid preview scrolls out of the window.

mermaid-bug.md

Steps to reproduce

  1. Load diagram
  2. Enable preview window in VS Code
  3. Place cursor on the last line of Mermaid code in the code window
  4. Use cursor keys or mouse wheel to scroll down 1 line

Observed behaviour

Entire (almost) preview diagram scrolls off the window and is no longer visible.

Desired behaviour

The preview should never scroll off the end of the diagram so aggressively that it becomes mostly invisible.

Notes

I do not want to disable preview scroll sync as it is useful for general MD files.

System

Mac OS X Tahoe 26.4.1
VS Code Version 1.117.0 (Universal)
Mermaid Chart extension Version 2.6.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions