microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.01k stars 28.79k forks source link

Markdown preview scrolling regression issue #140423

Closed af4jm closed 2 years ago

af4jm commented 2 years ago

Issue Type: Bug

I have MD preview set to auto-scroll with the source file, but not for source to auto-scroll with the preview.

I recently noticed that if I add a div (e.g. line 28 in the attached file), and that div has a MD blockquote in it, the preview will always auto-scroll to the top of that div, even if you're typing hundreds of lines further down the file.

I also just noticed today that if I put a MD HR (e.g. line 15), the same thing happens, auto-scrolling stops at that point... to get auto-scrolling to behave correctly in the attached file, I need to delete the HR at line 15 and either delete line 28 or remove the blockquote from inside the div

VS Code version: Code 1.63.2 (899d46d82c4c95423fb7e10e68eba52050e30ba3, 2021-12-15T09:40:02.816Z) OS version: Windows_NT x64 10.0.22000 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz (8 x 1800)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|31.89GB (20.43GB free)| |Process Argv|--file-uri file:///c%3A/src/AF4JM.code-workspace --crash-reporter-id 06338080-eec2-498d-98e0-cf3111dc1cde| |Screen Reader|no| |VM|0%|
Extensions (105) Extension|Author (truncated)|Version ---|---|--- html-snippets|abu|0.2.1 vscode-icalendar|af4|1.0.1 vscode-m3u|af4|1.0.0 vscode-caniuse|aga|0.5.0 Bookmarks|ale|13.2.2 rtf|ale|2.4.0 vscode-sqlite|ale|0.14.0 swagger-viewer|Arj|3.1.2 spellright|ban|3.0.60 armview|ben|0.4.5 markdown-checkbox|bie|0.3.2 markdown-emoji|bie|0.2.1 markdown-footnotes|bie|0.0.7 markdown-mermaid|bie|1.13.1 markdown-yaml-preamble|bie|0.1.0 vscode-tldr|bmu|1.0.0 mermaid-markdown-syntax-highlighting|bpr|1.2.2 npm-intellisense|chr|1.4.0 gitignore|cod|0.7.0 disableligatures|Coe|0.0.10 vscode-markdownlint|Dav|0.45.0 jshint|dba|0.11.0 vscode-eslint|dba|2.2.2 dendron-snippet-maker|den|0.1.6 rushcore|Dev|1.0.2 rushnav|Dev|1.0.2 githistory|don|0.6.19 xml|Dot|2.5.1 escaping-characters|drp|1.0.0 vscode-babel-coloring|dza|0.0.4 gitlens|eam|11.7.0 EditorConfig|Edi|0.16.4 vscode-npm-script|eg2|0.3.23 vscode-macros|EXC|1.3.0 git-project-manager|fel|1.8.2 scriptcsRunner|fil|0.1.0 vscode-firefox-debug|fir|2.9.6 vscode-npm|fkn|3.3.0 shell-format|fox|7.2.2 macros|ged|1.2.1 matlab|Gim|2.3.1 vscode-pull-request-github|Git|0.34.3 mdmath|goe|2.7.4 gc-excelviewer|Gra|4.0.50 beautify|Hoo|1.5.0 rest-client|hum|0.24.6 path-autocomplete|ion|1.18.0 mediawiki|jak|2.1.0 nuget-reverse-package-search|jes|0.1.68 vscode-nuget-package-manager|jmr|1.1.6 vscode-peacock|joh|4.0.0 gpg|jva|0.1.2 docomment|k--|0.1.30 vscode-liquid-snippets|kil|2.0.3 gnuplot|mam|1.0.5 markdown-shortcuts|mdi|0.12.0 openapi-lint|mer|1.2.0 HTMLHint|mka|0.10.0 azure-pipelines|ms-|1.195.0 vscode-azureappservice|ms-|0.23.0 vscode-azurefunctions|ms-|1.6.0 vscode-azureresourcegroups|ms-|0.4.0 vscode-azurestorage|ms-|0.12.1 vscode-azurevirtualmachines|ms-|0.4.1 vscode-bicep|ms-|0.4.1124 vscode-cosmosdb|ms-|0.18.1 csharp|ms-|1.23.17 vscode-dotnet-runtime|ms-|1.5.0 python|ms-|2021.12.1559732655 vscode-pylance|ms-|2022.1.0 jupyter|ms-|2021.11.1001550889 jupyter-keymap|ms-|1.0.0 jupyter-renderers|ms-|1.0.4 vscode-ai-remote|ms-|0.6.0 remote-containers|ms-|0.209.6 remote-ssh|ms-|0.70.0 remote-ssh-edit|ms-|0.70.0 vscode-remote-extensionpack|ms-|0.21.0 azure-account|ms-|0.9.11 azurecli|ms-|0.5.0 live-server|ms-|0.2.11 mono-debug|ms-|0.16.2 powershell|ms-|2021.12.0 vscode-node-azure-pack|ms-|0.2.1 vscode-typescript-tslint-plugin|ms-|1.3.3 azurerm-vscode-tools|msa|0.15.5 debugger-for-edge|msj|1.0.15 language-liquid|nei|0.1.1 azdo-wiki-md|ni|0.0.3 vscode-commons|red|0.0.6 vscode-yaml|red|1.2.2 kuskus-kusto-language-server|ros|1.0.20 kuskus-kusto-syntax-highlighting|ros|1.1.20 toggle-case|rya|1.0.2 vscode-hexdump|sle|1.8.1 vscode-zipexplorer|sle|0.3.1 addDocComments|ste|0.0.8 msbuild-project-tools|tin|0.4.3 shell-launcher|Tyr|0.4.1 vscodeintellicode|Vis|1.2.15 nanoid-generator|vk-|0.1.2 vscode-icons|vsc|11.8.0 JavaScriptSnippets|xab|1.8.0 markdown-all-in-one|yzh|3.4.0 t4-support|zbe|0.5.0
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492:30256859 pythontb:30283811 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscorecescf:30384386 pythondataviewer:30285071 vscod805cf:30301675 pythonvspyt200:30340761 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 pythonvs932:30410667 vscop804cf:30404767 vs360:30404995 vsrem710:30416614 py55gd98:30419165 vscexrecpromp3t3:30407764 ```
af4jm commented 2 years ago

gist with the example MD file mentioned in my above report... https://gist.github.com/af4jm/ee2625a86e97f7e20d98119baa0def67

mjbvz commented 2 years ago

Does this reproduce in the latest VS Code insiders build with all extensions disabled?

af4jm commented 2 years ago

the div yes, the hr no... I also noticed that if the editor window is below line 250, the preview scrolls with it, but as soon as the editor scrolls back above 250, the preview jump to the div

some I other things I tried (in Insiders with no extensions & empty settings file, although all behavior both above and below is the same as non-Insider with extensions & settings):

seeing that last bullet point, I'm wondering if I hit an edge case rather than a regression, because this is bizarre

af4jm commented 2 years ago

I've seen this issue within the last week... definitely not fixed

mjbvz commented 2 years ago

I tested with that file on VS Code insiders (1.72) and don't see this issue. I tried scrolling both the editor and scrolling the preview, as well as typing in the editor

If you are still seeing problems, please specific steps to reproduce it so I can try investigate