Every time I write something on stlye.css and save (or wait to live server to refresh), it scrolls my page up...it's really annoying, anyone know how to prevent this behavior?
Every time I write something on stlye.css and save (or wait to live server to refresh), it scrolls my page up...it's really annoying, anyone know how to prevent this behavior?
The trick to solve this is to do the following
In program Visual Code: File -> Preferences -> settings
In settings page drop down Extensions and click Live Server Config
Tick the box: Settings:Full Reload
It stops the change of scroll position that you ask for.
However if it scrolls from top of page (in Chrome at least) down to the scroll position you're on when saving/reloading it is because you use:
html {
scroll-behavior: smooth;
}
Just comment it out under development (if you have it/use it) and want to prevent that from happening.
Input from another user: Note: you have to stop the live server and start it again to see the changes (happened to me)
go to live server extension and Disable then enable it ( don't forget to reload window
go to vs code setting 1) markdown> Scroll editor with preview --> "off it" 2) markdown> scroll preview with editor --> "off it"