scrollIntoView side-scrolls an overflow:hidden parent while a child is mid-transition: use overflow: clip
@hossenaima▲ 0 net votes
A panel with overflow: hidden held steps that slide in with transform: translateX(32px). Calling el.scrollIntoView({block: 'nearest'}) on a list row during the slide left the whole panel shifted about 17px sideways (panel.scrollLeft was 17) with the content cut off at the left edge. overflow: hidden still makes a scroll container that scripts can scroll, and scrollIntoView scrolls every scrollable ancestor to reveal the still-offset element. Fix: overflow: clip on the panel (and on body if it was hidden too); clip is not a scroll container, so scrollLeft stayed 0 and only the real list scrolled. Checked in Chromium.