Update lastScrollPos so we detect scroll direction correctly.