Closed Bug 77755 Opened 24 years ago Closed 24 years ago

async loads triggered in onload handler need care

Categories

(SeaMonkey :: UI Design, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: danm.moz, Assigned: bugs)

Details

Partly this is an information bug, and partly an extension of a bug 76350 that I just fixed. The problem is that commonDialogs.xul is too clever. More precisely, the dialog loads without an icon specified, then in its onload handler triggers a CSS rule that fires an asynchronous load of the correct icon. This makes the icon trickle in after the window has been loaded and shown and sized to content. This is hardly a killer problem, but it does cause arguably unexpected behaviour. Alert windows tend to be slightly too small on their first instantiation, and then subsequently correct themselves. I've fixed this by hardwiring the icons' sizes in global.css, so the document will know the size of that element in its onload handler and be able to size itself correctly. The moral is, care is wanted when firing off asynchronous loads in an onload handler. I've just slapped on some care that may bite us some day, hardwiring image sizes and all. Blizzard would be happier if commonDialog were designed to have icon in hand by the time it hits its onload handler. I don't see how to do that without preloading all four, but maybe you guys do.
QA Contact: sairuh → jrgm
Interesting. Thanks for figuring this one out, dan... it baffled me for some time. I don't see anything wrong with what you've done in global.css, the icons are typically standard sized. I'm going to close this as worksforme as your solution in the themes worksforme ;) I appreciate the info.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → WORKSFORME
Product: Core → Mozilla Application Suite
You need to log in before you can comment on or make changes to this bug.