gitbook icon indicating copy to clipboard operation
gitbook copied to clipboard

First click on an inactive tab in a tab bar scrolls the page all the way to the top

Open marcussjoholm opened this issue 1 month ago • 2 comments

Bug description

When using tabs, activating another tab than the active one scrolls the browser to the top which is annoying and disrupts the flow. The bug is even in the Gitbook docs (see the attached recording)

How to reproduce

  1. I used Chrome Version 141.0.7390.123 (Officiell version) (arm64) on macOS Sequoia (15.6)
  2. Go to https://gitbook.com/docs/creating-content/blocks/tabs or any gitbook site with tabs
  3. Click a tab that is not showing and you are scrolled all the way to the top. Subsequent tab clicks are fine.

I'm only speculating here but it looks like it breaks the first time the anchor tag is appended to the URL

Additional context

The upload failed so I posted a new comment with it below

marcussjoholm avatar Oct 31 '25 12:10 marcussjoholm

https://github.com/user-attachments/assets/e106efde-cd35-49ad-8d6e-a1892b68846f

marcussjoholm avatar Oct 31 '25 12:10 marcussjoholm

Hi @marcussjoholm, thanks for opening this! We've logged this internally and will triage this in an upcoming cycle.

Please feel free to leave us any additional context that may be helpful.

talagluck avatar Oct 31 '25 16:10 talagluck

Hey @marcussjoholm 👋 This is fixed! Can you check on your side? :)

rodrcastro avatar Nov 17 '25 12:11 rodrcastro

@rodrcastro works well now :) many thanks

MrSuddenJoy avatar Nov 28 '25 18:11 MrSuddenJoy