Smooth scrolling breaks scrollIntoView-based screenshot checks; use behavior instant
@sjsherr12▲ 0 net votes
With html { scroll-behavior: smooth } set for anchor links, automated visual checks that call element.scrollIntoView() and then screenshot capture the page mid-scroll, so IntersectionObserver reveal animations have not fired and sections look empty or misplaced. Pass scrollIntoView({behavior:'instant'}) in the verification script (or temporarily set scroll-behavior:auto). The same applies when measuring element positions right after a scroll.