Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
We were testing out a new site on an HP Windows 8 machine and only one issue came up. The views accordion does not function at all. No errors appear at all either. The accordion just does nothing. The first item open while the rest are all collapsed. Even when I switch the browser mode to ie9, ie8 or ie7 the accordion just sits there like a static element.
Now on Windows 7, the accordion works just fine using ie9 and switching the browser mode to ie8 or ie7. So this issue strictly just involves some conflict with ie10 on a Windows 8 machine.
Comment | File | Size | Author |
---|---|---|---|
#6 | views_accordion-windows_8_ie10_breaks-1879218-6.patch | 1.07 KB | mcannon |
Comments
Comment #1
Manuel Garcia CreditAttribution: Manuel Garcia commentedThanks for the report!
Unfortunately I have no way to test this out, ... but I'll surely need further info.
Comment #2
mcannon CreditAttribution: mcannon commentedHi Manuel,
I have to wait for a colleague to bring his Windows 8 machine back into the office to check for specifics. But what I remember is I think the accordion did get built. It just was unresponsive to clicks. The JS console showed no errors either. So I had nothing to go off of to attempt to fix it myself.
Our fix for now is to detect IE 10 and kill the script before it runs so that the user can get to everything in the accordions in Windows 8.
I will check again when he brings his Windows 8 machine back in. Although, I doubt there will be any relevant info as I remember not seeing any errors. Every other script on the site works except for this one.
Comment #3
markporter CreditAttribution: markporter commentedI am using this on a website for a client and experiencing similar issues. I referred the client to the plugin developer's own website which seems to use the plugin on the homepage and that also seemed to be broken. My client reports being able to click on an initial item which will expand correctly, but that subsequent clicks achieve no change.
Comment #4
mcannon CreditAttribution: mcannon commentedI finally got to test this and it is just specific to IE 10 on Windows 8. There are no errors in the console. The initial script that builds the accordion runs just fine, but it does not seem like any events are binded to the accordion links as they are unresponsive to any user click. This is only specific to Windows 8 and IE 10. All other browsers on Windows 8 work fine with the accordion. Also, IE 9 on Windows 7 works just fine also.
My best guess is that Windows 8 changed their javascript engine that IE 10 is tied to and not all old syntax works with it in a unified way like all of us developers would like it to.
Comment #5
markporter CreditAttribution: markporter commentedOk, I think I've found the problem. I found that it was opening up the first item I clicked on but not subsequent ones. I thus suspected that the line preventing double clicking was the problem. Altering
" if (ev.detail === 1 || !ev.detail) { // so we prevent double clicking madness (for not so savy web users) !ev.detail is for when its triggered by code"
to
" if (ev.detail >= 1 || !ev.detail) { // so we prevent double clicking madness (for not so savy web users) !ev.detail is for when its triggered by code"
seems to make it function properly. Obviously this removes the niceties about double clicking, but I'm not really a coder and so this fix is better than nothing for me at the moment.
Comment #6
mcannon CreditAttribution: mcannon commentedHey markporter,
I tested out your fix and it does make views_accordion work on Windows 8/IE10. I tested it on other browsers also and I cannot see any difference in behavior. Double clicking does not appear to be any different then it was before the change. I even went back and forth with testing the before and after. I even went ahead and created a patch.
Did you notice any difference at all?
Matt
Comment #7
Manuel Garcia CreditAttribution: Manuel Garcia commentedI tested it (though not on w8), and nothing seems broken, I trust you for this fixing the problem, so i just committed it: https://drupal.org/commitlog/commit/8636/e6f064dafa02144769d08c4e4aba5ef...
Thanks!