relocate prevScrollY assignment to prevent analysis gaps