When using Superfish to create a dropdown menu that dropped/faded in
over the top of a Flash movie, I was having weird behavior on Firefox
2 on the Mac (and only that browser).  Turns out to be a bug in the
interaction between semi-transparent areas and Flash.  In my case,
when the menu faded in, the Flash movie turned white until the menu
was completely faded in.

My solution (in case anyone else runs into this problem):

In the superfish.js file, added this function after the sf.IE7fix
function:

sf.MacFF2fix = function() {
  var userAgent = navigator.userAgent.toLowerCase();
  if (/firefox[\/\s](\d+\.\d+)/.test(userAgent)) {
    var ffversion = new Number(RegExp.$1);
    if (ffversion < 3 && userAgent.indexOf('mac') != -1) {
      return true;
    }
  }
};

And then in the showSuperfishUl function, changed this:

$ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul);
o.onShow.call($ul); });

to this:

if (sf.MacFF2fix()) {
    $ul.show();
} else {
    $ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul);
o.onShow.call($ul); });
}

Which means that the fancy fade-in is absent on FF2 on the Mac, but
that was a whole lot better than the alternative.

Credit for the FF2 detection function go to this blog post:
http://jakeo.org/blog/2007/03/16/css-opacity-and-flash-transparency-in-mac-firefox/

Best,
Jason

Reply via email to