Download & Extend

ajax_load module brakes display tabs(Need to click tabs twice)

Project:Views Display Tabs
Version:6.x-1.0-beta6
Component:User interface
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

First this worked like a charm, then suddenly(not sure what i did to cause this), the tabs started to behave strangely.. when i try to change
tabs it works only with the first click.. when i try to change again, nothing happens the first click, and on the second click the tab gets loaded.. and whats even strange, no matter which tab i click second, the tab which i clicked first gets loaded.. so it's like first click tells the tab to load when some tab gets clicked the next time. Does this make sense?

clarification:

first:
tab1    tab2    tab3
content of tab1

then i click tab2:

tab1   tab2    tab3
content of tab2

then i click tab3:

tab1   tab2    tab3
content of tab2

then i click ANY tab:

tab1   tab2   tab3
  content of tab3

I noticed that if i disable ajax_load module(which i need for editable fields), the tabs start to work again. However, it used to work even with the ajax module loaded, so i'm not sure what happened?

Is there any way i could debug it or do you have some other ideas?

Comments

#1

Title:Need to click tabs twice» ajax_load module brakes display tabs(Need to click tabs twice)

Changed the title to little more descriptive.

#2

Thanks for reporting.

Unfortunately I don't have the time right now to debug this. I'll return to it once I have some time to spend on VDT.

#3

Could you even point me to some direction? This is really important for me.

#4

I commented out the line
.addClass('viewsDisplayTabs-processed');
and it started to work.
also changing the viewsDisplaytabs-processed to anything else makes it work.

Similary if i change the line

$('.viewsdisplaytabs-wrapper a:not(.aviewsDisplayTabs-processed)')
to
$('.viewsdisplaytabs-wrapper a:not(.viewsDisplayTabs-processedEDIT)')

it works.
What kind of negative impact this has, can i leave it like that or does something brake?

#5

Doing that will lead to the behavior being attached more than once. It could cause the view to try and load the display twice or more. I don't know why Ajax Load doesn't work with VDT and I'm sorry but I cannot look into it now. Though what you just reported hints at a possible explanation. Perhaps Ajax Load incorrectly attaches its own event handles to Views Display Tabs' links, thereby interfering with them. Your change above makes VDT reattached the behavior, on top of Ajax Load's so that it never runs.

#6

Yes, i think it actually now loads tabs twice since i can see two of those loading animations(the little circles) running at the same time when i change tab. However, since this fixes the issue
and doesn't seem to affect performance much, this will do fine for now unless i run in to some other problems. I hope you have time to solve the issue correctly at some point.
Thank you for the great module, it made possible to make lot nicer gui for my project management!

#7

subscribe

#8

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

Confirming this for beta 6 and subscribing

#9

looked a bit into it but couldn't figure it out - have to say I am pretty much a n00b at js. however, in my case I'm not using VDT and Ajaxload on the same page; just opted for editing ajaxload.module changing the drupal_add_js behavior.

nobody click here