ended3월 24일· 1 sources
How to Get the Correct Y Position of an Element in CHATGPT UI
ChatGPT UI에서 요소의 정확한 Y 좌표를 구하는 방법
Why it matters
In ChatGPT's web UI, window.scrollY always returns 0 because scrolling occurs inside a nested container rather than the document itself. The article explains how to find the actual scroll container by walking up the DOM, then calculate the correct Y position using getBoundingClientRect().top combined with the container's scrollTop. It also provides verification methods and notes this pattern applies to browser extensions, UI automation, and any SPA with internal scroll containers.
1
Sources
+0
24h
—
Growth
176d
Active
scrollYgetBoundingClientRectChatGPT UIscroll containerDOM positioning