Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.122.1 (user setup)
- OS Version: Windows_NT x64 10.0.26100
Steps to Reproduce:
- Open or create a new untitled Markdown file. Fill it with enough lines (e.g. 200 lines of
1\n\n each) so the preview height exceeds the screen.
- Scroll the editor to the top, then use
Ctrl+Shift+V (markdown.togglePreview) to enter preview.
- Scroll the preview to the bottom, then use
Ctrl+Shift+V again to exit preview. Observe that the editor now shows the last few lines at the top — the scroll position has been "locked" to the source line corresponding to the top of the preview at exit.
- Scroll the editor back to the top (via scroll wheel or
Ctrl+Home).
- Switch to another editor (any language), then switch back to the Markdown editor — using mouse click,
Ctrl+Tab (workbench.action.nextEditor / workbench.action.previousEditor), or Alt+← (workbench.action.navigateBack).
- Bug: The editor jumps back to the locked position from step 3. When switching back from another editor group via mouse click, the click-down event triggers an immediate scroll, which also creates an unintended text selection (as if the user were holding the mouse button while scrolling).
Notes:
- The issue persists with
--disable-extensions (but built-in Markdown extension is still active).
- The following settings do NOT fix it:
"markdown.preview.scrollPreviewWithEditor": false
"markdown.preview.scrollEditorWithPreview": false
code --user-data-dir "$env:TEMP\vscode-clean-test" --disable-extensions to create a window with clean profile
- The "locked" position is essentially the source line that was at the top of the preview when
togglePreview was last used to exit preview mode. The editor remains bound to that scroll position until the next reload, even after manually scrolling away.
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
1\n\neach) so the preview height exceeds the screen.Ctrl+Shift+V(markdown.togglePreview) to enter preview.Ctrl+Shift+Vagain to exit preview. Observe that the editor now shows the last few lines at the top — the scroll position has been "locked" to the source line corresponding to the top of the preview at exit.Ctrl+Home).Ctrl+Tab(workbench.action.nextEditor/workbench.action.previousEditor), orAlt+←(workbench.action.navigateBack).Notes:
--disable-extensions(but built-in Markdown extension is still active)."markdown.preview.scrollPreviewWithEditor": false"markdown.preview.scrollEditorWithPreview": falsecode --user-data-dir "$env:TEMP\vscode-clean-test" --disable-extensionsto create a window with clean profiletogglePreviewwas last used to exit preview mode. The editor remains bound to that scroll position until the next reload, even after manually scrolling away.