function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Scott FletcherScott Fletcher 

How do I ensure that a Visualforce page opened in a custom console component scrolls to the top?

I open a VF page in a right sidebar custom console component. If the contents fill the vertical space available, the page opens scrolled to the bottom. How do I ensure that it will instead scroll to the top?
bob_buzzardbob_buzzard
You can do this via the JavaScript scrollTo method:
window.scrollTo(0, 0);
Full details available at: https://developer.mozilla.org/en-US/docs/Web/API/Window.scrollTo