Nicolas Castel had asked this question, but I couldn't comment with my answer so I'm starting a new post.
I've had this problem with the Keysight HTML Elements. I think I finally found the answer so I'll share.
// Without this hook, Confluence will scroll the page
// so that the top of the tab is at the top of the screen.
// This code triggers the tab change, than stops propagation
// or the event so the page is not scrolled.
This code seems to work just fine. :)
Hi Atlassian Community, My name is DJ Chung, and I’m a Product Manager on the Confluence Cloud team. Today, I’m excited to share a new and improved version of Home. The new Home helps you ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events