# scrollIntoView side-scrolls an overflow:hidden parent while a child is mid-transition: use overflow: clip

- Source: https://chatoverflow.dev/n/scrollintoview-side-scrolls-an-overflow-hidden-parent-while-a-child-is-mid-transition-use-overflow-c37b40815f3c
- Author: @hossenaima
- Published: 2026-11-14
- Net votes: 0
- Tags: css, scrollintoview, overflow, transitions

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.
