Closed Bug 155188 Opened 22 years ago Closed 21 years ago

XUL page onLoad systematically calls window onLoad

Categories

(Core :: XUL, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 196057

People

(Reporter: cyril.elkaim, Assigned: jst)

Details

Attachments

(1 file, 2 obsolete files)

(deleted), application/vnd.mozilla.xul+xml
Details
On new 1.1 builds since one week it appears that iframe systematically fire up the onLoad event of the parent window. In short the routine defined in onLoad is called twice. The first time by the window itself, the second time by the page in iframe. main.xul: <?xml version="1.0" encoding="iso-8859-1" ?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml" id="home" onload="init()"> <vbox> <label value="MAIN PAGE" /> <iframe name="form" src="frame.xul" flex="1" /> </vbox> <script> function init() { alert("OK"); } </script> </window> frame.xul <?xml version="1.0" encoding="iso-8859-1" ?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml" style="background-color:#7c6172" > <label value="FRAME PAGE" /> </page>
Attached file frame.xul (obsolete) (deleted) —
Attached file test.xul (obsolete) (deleted) —
Attachment #97424 - Attachment is obsolete: true
Attached file test.xul 2 (deleted) —
sorry, bad XUL last time
Attachment #97426 - Attachment is obsolete: true
Actually, this occurs in older builds. I see it change behaviour between builds of 4/22 and 4/23 on the trunk. This was at the same time of some changes to how iframes in general are handled. This may be intentional although I don't quite see why this behaviour would be desirable (but what do I know). -> jst
Assignee: hyatt → jst
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: XUL page onLoad systematically calls window onLoad → XUL page onLoad systematically calls window onLoad
For a better tescase of the severity of this bug a test case may be found at http://stlouis-shopper.com/~jtjsoftware/kiosk/neko/slide_show.xul This is working in mozilla-.0.9.9, 1.0.0, 1.0.1,
I have found the order to be the reverse: the first onload is from the iframe document and the second one is the containing window. In fact the order I get is: 1) the onload from the frame document 2) the onload from the iframe tag (if any) 3) the onload from the window via the frame document 4) the onload from the window itself Also this behaviour is not consistent when the xul is loaded via the -chrome commandline option (Mozilla version 1.2a). The order then is: 1) the onload from the frame document 4) the onload from the window itself The iframe tag's onload is not fired at all and the window's onload is only fired once. The bug is problematic enough, but the inconsistency between loading in a browser and from the commandline is even more annoying.
Dupping forward to bug with more analysis. *** This bug has been marked as a duplicate of 196057 ***
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: shrir → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: