I don't know if this happens in tabs, or in tabs panel style. When a tab is clicked instead of just switching tabs, the user is also sent back to the top of the page. I can't remember if this happens since I've created a new (partial, still under development) theme or if it happens since the beginning.

Thansk in advance!

#15 vertical_scroll-502988-15.patch1.38 KBevanbarter
Members fund testing for the Drupal project. Drupal Association Learn more


samhassell’s picture

I'm also seeing this behavior, and its a bit disorientating.

crea’s picture

Title: Don't go back to top on click » Page is vertically scrolling when switching tabs
Category: support » bug

I think this is a bug and it's very annoying.

crea’s picture

I have found related discussion:
Workaround posted there is maybe ugly, but it fixed this problem for me: set tab container height. In my theme this is like:

#tabs-tabset {

You need to play with height to find a number that suits your case.

dawehner’s picture

I don't think this is a generic solution. Perhaps there are some css gurus out there to fix the issue.

a_c_m’s picture


My idea would be to set the height for the panel with a inline style, which is calculated by JS at render time.

smoothify’s picture

Project: Panels Tabs » Tabs (jQuery UI tabs)

Moving this to tabs module, where I think the issue would be more easily solvable.

I noticed similar issues in the queues of both the CCK FieldGroup Tabs and Views Tabs:

#838598: Switching tabs causes page to scroll up and down.

#839756: don't momentarily reduce the height of a views tab group when a new tab is chosen.

I realise the following issue is related to vertical tabs in core which is entirely separate, however the patches on there may contain a hint on how to fix this behaviour in jquery ui tabs too.

#437546: Vertical Tabs: Reduce scrolling up and down

ceddo’s picture

I also have this issue, I'd really appreciate if someone could post a clean fix to this as my website needs to be finished asap! :(

mrfelton’s picture

subscribing. Temp fix is to set absolute height (on min-height). Not really a good fix though.

jdwfly’s picture

bryancasler’s picture


Apfel007’s picture


fourmi4x’s picture


Ed77’s picture

What I did (and worked fine)... I replaced the tabs.js from the tabs module, with one from the drupal 5 version of the module.
Note: In drupal 6 the tabs.js is in te Tabs module, in drupal 5 tabs.js is in jstools/tabs/tabs.js

zepner’s picture


evanbarter’s picture

Status: Active » Needs review
1.38 KB

Ran in to this issue, attaching a patch with a solution based off this solution.