It's unusual to find Firefox (3.5) misbehaving - usually it's my default standards-compliant browser - but I recently posted a question to Stackoverflow as a direct result of Firefox behaving very strangely indeed.
I've been developing various bits of eyecandy for one of my clients who owns the Tartanweb website, one of which is a 3D model of a man in Highland Dress who can be interactively rotated and dressed in different tartans, jacket styles and so forth. The applet was coded up using Wirefusion, and previously we've always displayed it in it's own browser window.
As part of developing a redesign of the site we decided to display the applet in a Lightbox type popup - actually using Kevin Millar's excellent Lightwindow implementation. I used an embedded iframe for this, so the lightbox popup is displaying a simple web page which consists almost completely of an iframe, within which is the actual web page containing the Wirefusion applet. So far so good, and the lightbox popped up, initialized and displayed the applet just fine in all versions of IE, Chrome and Safari. Firefox however refused to work, giving me a javascript error whenever I tried to call any of the exposed functions
Error: document.appletname.send is not a function
Investigation by inserting diagnostic Javascript (being in an iframe it was difficult to get to the raw code generated directly and the page works just fine if not executed via the lightbox) revealed no oddities about the page - there was indeed just one embedded applet with the correct name, Firefox just couldn't see the exposed send function.
Closer investigation of the javascript generated by Wirefusion to load the applet (launcher.js) revealed that this functions by dynamically writing the applet code to the page on load, which suggests a timing bug. Firefox also behaves strangely in that when the applet page loads the applet appears to initialize twice - a behaviour not seen with other browsers. To fix this I amended the launcher code to encapsulate the javascript writing out the applet code in a function which returns the code in a string, and used this to set the innerHTML property of a dummy div called from the window.onLoad event. Which worked - although only in Firefox. To include IE and Safari I needed to add some browser detect code and write out the applet directly as before for these two.
So decidedly strange, although with the trail of main page -> lightbox -> iframe -> java applet perhaps understandable, it must be an unusual combination. That it happens with Firefox only is the real surprise and I'll make a note to retest it on each significant Firefox update.


