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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Manuel Garcia’s picture

Thanks for the report!

Unfortunately I have no way to test this out, ... but I'll surely need further info.

  1. Is the accordion built at all or do you see normal text output?
  2. If its built, do you see any errors on the JS console (i assume ie for w8 has one...)
mcannon’s picture

Hi 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.

markporter’s picture

I 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.

mcannon’s picture

I 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.

markporter’s picture

Ok, 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.

mcannon’s picture

Hey 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

Manuel Garcia’s picture

Status: Active » Fixed

I 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!

Status: Fixed » Closed (fixed)

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