After some more digging it seems that this is a known bug with Flash
on Linux. Fortunately, I came across a blog post (http://
blog.marcoos.com/2006/07/21/html-div-above-a-flash-animation-on-linux-
its-possible/) that describes a dirty hack using an iframe with a z-
index between the Flash player and a div that will appear above it.
I made a quick hack to use this technique in Facebox. You can see it
in action at
http://galathil.googlepages.com/testrabbit3.html. This
works on Linux with Firefox 3 (with the minor issue of the non-rounded
iframe corner bleeding through) and doesn't appear to cause any
inconsistencies with Firefox on Windows. IE 7 has some trouble though;
I believe it is an issue with transparent iframes there. My
modifications are included inline below (diff against v1.2).
diff -u a/facebox.css b/facebox.css
--- a/facebox.css 2008-05-05 14:28:41.000000000 -0400
+++ b/facebox.css 2008-07-10 15:08:24.000000000 -0400
@@ -80,6 +80,15 @@
width:100%;
}
+#facebox_foundation {
+ background-color: transparent;
+ display: none;
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 98;
+}
+
.facebox_hide {
z-index:-100;
}
diff -u a/facebox.js b/facebox.js
--- a/facebox.js 2008-05-05 14:28:41.000000000 -0400
+++ b/facebox.js 2008-07-10 15:08:24.000000000 -0400
@@ -140,6 +140,11 @@
$('#facebox .loading').remove()
$('#facebox .body').children().fadeIn('normal')
$('#facebox').css('left', $(window).width() / 2 - ($('#facebox
table').width() / 2))
+ $('#facebox_foundation').width($('#facebox').width())
+ .height($('#facebox').height())
+ .css('display', 'block')
+ .css('left', $('#facebox').css('left'))
+ .css('top', $('#facebox').css('top'))
$
(document).trigger('reveal.facebox').trigger('afterReveal.facebox')
},
@@ -188,6 +193,7 @@
if (settings) $.extend($.facebox.settings, settings)
$('body').append($.facebox.settings.faceboxHtml)
+ $('body').append('<iframe id="facebox_foundation"
src="javascript:false;document.write(' + "''" + ')"
allowtransparency="true" scrolling="no" frameBorder="0"></iframe>')
var preload = [ new Image(), new Image() ]
preload[0].src = $.facebox.settings.closeImage
@@ -314,6 +320,9 @@
hideOverlay()
$('#facebox .loading').remove()
})
+ $('#facebox_foundation').fadeOut('fast', function() {
+ $(this).css('display', 'none')
+ })
})
})(jQuery);