PDA

View Full Version : Firefox, onLoad, and background images.



jlizarraga
05-09-2008, 10:36 PM
So I am dealing with this bug (officially a feature?) right now:

https://bugzilla.mozilla.org/show_bug.cgi?id=253851

They claim that this is fixed, but clearly it isn't, as evidenced by the example from the link above:

http://gavinsharp.com/bug/253851/

Firefox fires onLoad before background images are loaded. They say that this is a feature to make pages appear to load faster, but it actually has the opposite affect for the site I'm working on:

http://futureford.autofusion.com/

In IE, the flash piece doesn't start until all images and background images are fully drawn/rendered. In Firefox, the movie appears to start early and the page looks broken because of this "feature."

Is there a workaround that anyone knows of? Any tips would be greatly appreciated.

jlizarraga
05-09-2008, 11:42 PM
I emailed Gavin Sharp, and got this answer:

> Why is this bug marked resolved fixed when your test page for the bug
> still exhibits said bug in FF2?

Because the patch was landed for Firefox 3 alpha 8 (the latest Firefox
3 milestone is Firefox 3 beta 5, with Firefox 3 release candidate 1 due out shortly). FIXED in Bugzilla refers to the status of the bug on the development "trunk" (latest code).

You can set the layout.fire_onload_after_image_background_loads pref to true in Firefox 2 to get that behavior, or you can try out one of the Firefox 3 development milestones.

Gavin

> Wow thanks for the quick response!
>
> But isn't that preference a user-specific thing? Is there a way to
> tell
> FF2 to set that pref to true from within the page? Or is there some
> kind of workaround?

It is user-specific, yes. There's no way to control it from the page, and I don't know of any workarounds, unfortunately. The good news is that the fix will be in Firefox 3 which should hopefully be released within a month or so.

Gavin