I\'m prepending content to the top of the body. Sometimes this content can be 400-500px tall, and when something like this gets added, pushing the content down when you are read
I know, I'm very late to that topic. Sorry for undigging it, but I discovered a very simple way for preventing scrolling to top when you prepend elements to the body.
The auto-scrolling appends when the scroll Y-position is at zero. Simply do this :
element.scrollTo(0, 1);
And your element won't automatically go to the top after the prepend.