Editor <-> Preview Sync feature request

Hello @Anthony
Is it possible to have the Preview window vertical scroll position sync to the endpoint being worked on in the Editor?
For me, whenever the Preview window refreshes it goes to the top.

VSCode, Windows 10, v4.35.0

Hi Steve,

  • There’s an existing feature request to sync the doc preview with the API spec. Checking to see if its feasible…

  • About seeing the preview window jump to the top on auto refresh, I checked on Windows and Mac with the same extension version and not seeing that behavior. When I make a change and the preview refreshes, it doesn’t go to the top.

I’ve searched the VSCode settings but didn’t find anything that causes the preview to autoscroll to the top. Possibly interference from another VSCode extension you’re using?

Apologies @Anthony , I did a search but couldn’t see any feature request for it.

I’ve checked the ā€˜jump to top’ behaviour and I can reproduce it after a machine restart overnight.
The selected endpoint remains ā€˜open’ / selected, but I have to scroll back down the page to see it.

I don’t get the behaviour in the video, after an edit it jumps to the top of the page.

When I have time, I’ll disable some other extensions and provide an update.

Thanks :slight_smile:

Disabled all Extensions except RedHat YAML and OpenAPI (Swagger), restarted VSCode.
I still get the same behaviour.

Is there any output from the Preview that I can capture?

Does it occur for every OAS file?
Try it with this sample file to check if the file contents are a factor:

Toggle open the Developer Tools in VSCode, clear the console and then reproduce the issue. See if there are any issues reported in the console.

Using that example yaml, it works fine. No jumps to the top.
I’ll see if I can reproduce with some generic yaml with no sensitive info in.

1 Like