Tabs autoplay script automatically scrolling page down

Hi,
I have been using @pepperclip’s script (original here) to have Tabs autorotate every few seconds with no problem. However, starting about a month ago, whenever the tabs autorotate, the viewport will automatically scroll down to the Tabs element. This happens in both Safari and Chrome, both on iOS and iPadOS.
I also noticed that this only happens when the page is scrolled all the way to the top. If the page is scrolled down even a few pixels it no longer does it.
Could anybody help me figure out where the issue is?
Thanks!!!


Here is my site Read-Only: Read-Only

Published site: Published site

The issue was with the JavaScript code. I faced a similar issue where the page would scroll up automatically when changing tabs. After lots of research, i found the solution

  1. (script src=“https://tools.refokus.com/automatic-tabs/bundle.v1.0.0.js”) (/script) - paste it before the of your page. Replace () with <> for script
  2. Select tabs and give custom attribute as Name = r-automatic-tabs and value = 1.

Note: The attribute value (ie. the ‘=1’) also controls the amount of seconds it takes to automatically change the tab. for example: if value is 1 then tabs will switched for 1 second each.