Bug report for troubleElements in Shadowbox 3.0.0

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Bug report for troubleElements in Shadowbox 3.0.0

Guillaume F
Hi,

First of all, thanks for your great product. We were searching for a product compatible with Prototype and still in developpement. We did bought a multiple developper license.

Presentation aside, we did find a bug in Shadowbox 3.0.0 where the troubleElements function simply wouldn't work. Causing flash and select to overlay shadowbox. We did an upgrade to version 3.0.2 in case it might solve the problem, but it didn't.

One of my collegue has found a bug inside de function toggleTroubleElements. Here is his suggestion :


The each function always return to arguments, so this function no longuer work :

 function toggleTroubleElements(on) {
    if (on) {
      each(visibilityCache, function (i, el) {
        el[0].style.visibility = el[1] || ""
      })
    } else {
      visibilityCache = [];
      each(S.options.troubleElements, function (tag) {
        each(document.getElementsByTagName(tag), function (el) {
          visibilityCache.push([el, el.style.visibility]);
          el.style.visibility = "hidden"
        })
      })
    }
  }

Here is the correction :

 function toggleTroubleElements(on) {
    if (on) {
      each(visibilityCache, function (i, el) {
        el[0].style.visibility = el[1] || ""
      })
    } else {
      visibilityCache = [];
      each(S.options.troubleElements, function (j, tag) {
        each(document.getElementsByTagName(tag), function (k,el) {
          visibilityCache.push([el, el.style.visibility]);
          el.style.visibility = "hidden"
        })
      })
    }
  }


We did our own correction to the shadowbox library 3.0.0. We can't updrade right now because we are in the middle of test, but we would appreciate if this could be fix in the next release.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Bug report for troubleElements in Shadowbox 3.0.0

mjijackson
Administrator
This has been fixed and is included in the 3.0.3 release. Thanks for the fix!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Bug report for troubleElements in Shadowbox 3.0.0

Guillaume F
In reply to this post by Guillaume F
Thanks for the quick support :)
Loading...