Tabs don't keep their order

matt.nz - September 22, 2009 - 02:08
Project:Tabs (jQuery UI tabs)
Version:6.x-1.2
Component:User interface
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Sometimes the tabs randomly change position, not paying attention to the order allocated by the form.

#1

nedjo - September 22, 2009 - 03:09

Hmm, possibly a bug introduced by the recent conversion in how we process tabs. Previously we explicitly assigned weights. I stripped out that code because it didn't seem to be needed any more, but possibly I was wrong....

Meantime you could explicitly assign #weight properties to your tabpage elements, but we should identify and fix this issue.

#2

matt.nz - September 22, 2009 - 04:33

Ah, thanks, that works perfectly! I have a loop to generate the items and just added:
'#weight' => $tabcount++,
and it does exactly what it needs to.

Looks like the weights might be a necessity!

#3

matt.nz - October 1, 2009 - 20:10

Hmm, apparently editing the weights doesn't completely fix the order the tabs want to take. Now the 'last' class is assigned to something that's not the last tab. For me, the second to last tab takes the class "last". Screenshot of tabs structure attached.

AttachmentSize
tabweightissue.png 3.69 KB

#4

dww - October 26, 2009 - 09:54

FWIW, I'm seeing the same problem on a site I'm working on now using 6.x-1.2 of tabs. Manually setting the weight does the trick for me, too...

 
 

Drupal is a registered trademark of Dries Buytaert.