GUAC-705: Only call window.scrollTo() when absolutely necessary.