Is it possible to find the function that caused page scroll

After 3 days of trying to find this mysterious function it came to me after posting the same question a second time, the function that is causing the page to scroll ended up being the .focus() function. I remembered it from a long time ago, but since I never used it ever since I learned about it and it isn't easy to relate to all the other scroll functions, it was giving me a hard time.

Thank you all that tried to pitch in with this. Hopefully someone else in the future will find this useful.


In 2020, go to Chrome's Dev Tools, Sources tab, and on the right pane, scroll to the very bottom to find Event Listener Breakpoints.

There you'll find scroll inside the Control group. Clicking on the checkbox will stop execution (it's a breakpoint) whenever the scroll event is fired, and you'll be able to trace the code who did it in the same pane (right side), under the Call Stack group (it's probably the first group in the right pane after debugger kicks in).

enter image description here