Download & Extend

No JS: "vertical-tabs clear-block" is shown

Project:Vertical Tabs
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

If you disable javascript support in your browser and load the node add page you can see a

<div class="vertical-tabs clear-block"> </div>

See the attached screenshot. I have not verified if this is also in D7.

AttachmentSize
vertical_tabs_no_js_bug.png3.98 KB

Comments

#1

Can you verify this happens in the latest version?

#2

Version:6.x-1.0-beta3» 6.x-1.0-beta4

Yes, it is still shown in the latest release.

#3

Version:6.x-1.0-beta4» 6.x-1.x-dev
Assigned to:Anonymous» Les Lim
Status:active» needs review

Yes, this is still there. The module uses Form API to create the Vertical Tabs container and JS to move the fieldsets into it, but if javascript is unavailable, we'll still be left with an empty DIV that has a border but no tabs.

One solution is to hide the Vertical Tabs container in the default CSS and show it with JS when the interface is being processed. Patch attached.

AttachmentSize
vertical_tabs-475850.patch 1.24 KB

#4

Status:needs review» fixed

Tested and works just fine. Committed to CVS (http://drupal.org/cvs?commit=285296). Thanks!

#5

Assigned to:Les Lim» Anonymous
Status:fixed» active

Hold on, is this the right approach? What if there's a case in which a themer wants to use CSS to hide vertical tabs for some reason? Using javascript to forcibly show the interface will always override that intent. This may be worth further thought.

#6

Status:active» fixed

Best way is to backport the D7 JavaScript code to manipulate the elements inside the and show those only. For now, this is the best approach. If you have a patch, please open a new issue.

#7

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.