Closed (outdated)
Project:
Quick Tabs
Version:
7.x-3.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
10 Jun 2009 at 14:25 UTC
Updated:
10 Dec 2024 at 23:50 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
pasqualleI have tested this, the tab selection works without problem in IE7..
the patch is wrong as key can be a string and tabIndex is a number..
first thing you should check, if the page is a valid HTML, as that is the most common problem when something does not work in some browsers..
use http://validator.w3.org/
or the firefox plugin: Html Validator
Comment #2
ndeschildre commentedWeird.
I'll look deeper on that.
Thanks.
Comment #3
kotu commentedI had the same problem (#508284: Tab's content is moved to next tab (IE6 & IE7)), patch listed above solves it so far...
Comment #4
pasqualleI confirmed the issue in #508284: Tab's content is moved to next tab (IE6 & IE7) so this is actually a bug, but the patch is not good enough as described in comment #2.
Comment #5
pasqualletagging
Comment #6
asak commentedThe patch works for me...
Has anyone had any actual problems because of it...?
Comment #7
pasqualleyes,
#2: the patch is wrong as key can be a string and tabIndex is a number..
Comment #8
asak commented@Pasqualle: can you say that in a practical kind of way...?
I truly don't understand what that really means, and would appreciate if you could use an example for all us dummies ;)
And.. everything does seem to work... so if simply must refrain from doing something (which apparently i haven't done yet) that could be an acceptable workaround for now...
Thanks!
Comment #9
pasqualleif you create the quicktab through the admin UI, then the tab key is 0, 1, 2, 3 ..
but it you create the quicktab with code #332895: render quicktab programatically, then the tab key could be anything like 'first', 'second', 'third'
in this case the patch will break the functionality..
Comment #10
alesand commentedLooks like this is a bug that appears only in IE7.
Line 51 in quicktabs.js needs to be changed from
this.tabpage_id = 'quicktabs_tabpage_' + this.qtid + '_' + this.tabKey;
to
this.tabpage_id = 'quicktabs_tabpage_' + this.qtid + '_' + this.tabIndex;
Comment #11
tabakerka commentedHello,
I think a lot of people are facing different issues because of the same problem. My issue was "content disappeared in all tabs in IE 7". I had debugged a little in Firebug and found that browsers behave differently with these Drupal.settings.quicktabs[qtKey].tabs.
I don't know what was the reason for the introduction of "var i", but without it the script works perfectly in FF,IE7,Chrome and Safari. Hope this patch would help somebody.
------------------------------------------------
You can always find me here - http://andrei.in.ua
Comment #12
pasqualle@tabakerka: your patch is the same as the previous, so your patch is also wrong
from comment #1
Comment #13
pasqualle@tabakerka: and please do not put personal links into issue comments, otherwise your account could be banned..
Comment #14
jdlind38 commentedPatch #1 & #11 fixed the problem for me. Thank you.
Comment #15
cap60552 commentedI am experiencing this problem also. My page validates as XHTML 1.0 Transitional as intended, however in ie7 and ie7 only, the tabs are incorrect.
You can see this problem at: https://library.waubonsee.edu/
Comment #16
cap60552 commentedI did some more exploration of this problem. It seems, as said in the initial post, that for some reason in ie7, the first element of 'Drupal.settings.quicktabs[qtKey].tabs' that is returned in the for loop is the string "indexOf".
This throws off the correlation between the tabs, and the index variable i. I threw together a quick hack that ignores this value when incrementing the index variable i. This seems to have solved the problem for me, without breaking the ability to use non numeric keys for tabs.
I have not tracked down what is actually causing indexOf to appear in the settings array, but if that can be solved that would be a better fix.
When looking over the page source I can see that initially when Drupal builds the page code, 'Drupal.settings.quicktabs[qt_1].tabs' equates to "tabs": [ 0, 0, 0, 0, 0 ]
however my other quicktab, qt_2 has a much more robust array of data:
{ "tabs": [ { "bid": "account_delta_0", "hide_title": 1, "title": "Summary", "weight": "-10", "type": "block" }, { "bid": "account_delta_1", "hide_title": 1, "title": "On Loan", "weight": "-9", "type": "block" }, { "bid": "account_delta_3", "hide_title": 1, "title": "Holds", "weight": "-8", "type": "block" }, { "bid": "account_delta_2", "hide_title": 1, "title": "Bills", "weight": "-7", "type": "block" } ] }
I have attached my patch to this message.
Comment #17
dooug commentedAfter many headaches, (and unfortunately before I found this post) I also made a patch that fixes this error. I believe it basically the same as patch #16 .
+1 that it works. Hope it gets committed soon.
Comment #18
mr.j commentedNot sure if this is the case here, but I suspect this is a common javascript error that you have made.
I am assuming Drupal.settings.quicktabs[qtKey].tabs is an array. Please excuse if not.
You should never iterate a javascript array using a for ... in loop. It should only be used for properties of objects.
This is because Array is a descendant of Object so when you are performing a for .. in loop you are iterating the properties/methods of the array Object, not only the elements. Usually you get away with it because the default properties and methods are not enumerable. But in this case it looks like some other javascript somewhere is adding an indexOf method to the Array.prototype (it is not standard) and hence you are iterating over it unintentionally.
The patches submitted above will still break things if you mix in another javascript framework that adds other array methods to the prototype apart from indexOf.
The solution: instead you should be using a regular for loop and refer to the array elements by index.
for (var i = 0; i < array.length; i++)Comment #19
delmarr commentedI am having a issue with the class .quicktabs-hide being added to both tabpages. When the tabs are clicked the class isn't removed, so no content (it's a views list if that helps). This only happens in ie 7 and ie 6, not sure about 8. Is this related?
I also have two QTs on the page
http://dev.popmontreal.com
thanks for any insight.
Comment #20
pasqualleComment #21
mstrelan commentedAs mentioned in #18 the patches in #16 and #17 need a bit of tweaking. Here is a patch that will always work (and as a bonus it applies against CVS!)
Comment #22
kevin.reiss commentedComment #23
masher commentedI had the problem in IE6 only.
Initial tab didn't display and the other links were out of sinc e.g. 1=0, 2=1, 3=2 etc.
Patch #21 worked perfectly.
Many thanks
Comment #24
bradweikel commentedPatch #21 worked for me as well, fixing problems in both IE6 and IE7.
Comment #25
rockitdev commentedPatch #21 worked for me on 6.x-3.0-beta1
Comment #26
Sjarsena commented@alesand Reg #10
I am to confirm that this worked for me change switch out 'key' with 'Index' . My only concern is if the quicktabs module is later updated and this if not fixed in a new version will be changed back to the original state causing the same issue again.
Comment #27
makangus commentedFresh install on drupal7 has the same problem on IE6 and IE7. Confirmed patch from #21 mstrelan worked for 7.x-3.0
Comment #28
franzConfirm it fixes the issue.
Comment #29
Foole commentedConfirm that this is still a problem in Quicktabs 7.x-3.2 and that applying #21 mstrelan patch fixes the problem.
Will this fix be included in the next release of Quicktabs?
Comment #30
Frederic wbase commentedjust tested the patch from 21 on the 6x3 version and it seems to work.
thx
fre
Comment #31
justindodge commentedThis is still an issue for 7.x-3.3
The patch no longer applies, but I wrote it in manually and it solves the issue.
I'll try to re-roll for 7.x-3.3 if/when I get a chance, but it's only a couple lines for anyone else that's having this issue and needing a fix immediately.
Comment #32
justindodge commentedHere's the patch from #21 but rolled against the current 7.x-3.x-dev branch.
Comment #33
rudetrue commented#32 fixes the issue for me as well in IE
Comment #34
ultimateboy commentedAn issue 4 years in the making... finally committed #32 to 7.x-3.x.
Thank you all for the contribution.
http://drupalcode.org/project/quicktabs.git/commit/88d0ba4d7d6715e7bf58b...
Comment #36
japerrySorry to put a bug in 'yall -- but QT is broken now for other browsers, and we had to revert this issue for commons:
#2104643: Quicktabs breaks when tabs are hidden
Comment #37
smustgrave commentedWith D7 EOL approaching in a month I'm starting to triage the D7 side of quicktabs queue. This doesn't appear to have any code so believe this may not make it, sorry! Thanks though!
If still an issue or needed for 4.0.x (latest branch) feel free to reopen
With IE gone also.
Comment #38
mstrelan commentedWow, blast from the past here.
Not only is IE gone, this was only an issue in IE7! Furthermore, this issue pre-dated Drupal's use of Git, as the patch applied to CVS.
Comment #39
smustgrave commentedlol currently triaging this queue, closing most issues but a few stuff I'll merge into D7 branch and do 1-2 last releases.