Opened 16 years ago

Closed 16 years ago

#544 closed defect (invalid)

dojo.event.connect works differently in IE6.0 and Firefox1.5.0.1

Reported by: anonymous Owned by: anonymous
Priority: high Milestone:
Component: Widgets Version: 0.2
Keywords: Cc:
Blocked By: Blocking:


using dojo.event.connect to attach a handler to the body element works in IE6.0.2900.2180 - but not in Firefox1.5.0.1

This code produces 2 toolbars in IE - only one in Firefox (and if dojoType="Editor" is removed from the 'dojoEditor' DIV tag, one is produced IE, and none in Firefox:

        <script src="/scripts/dojo/dojo.js" type="text/javascript"></script>
        <script type="text/javascript">
            function loadPage() {
                var editor = dojo.widget.fromScript("Editor", {}, dojo.byId("dojoEditor"));
    <body id="bodyNode">
        <div id="dojoEditor" dojoType="Editor" >
            some content
        <script type="text/javascript">
            var bodyNode = document.getElementById("bodyNode");
            dojo.event.connect(bodyNode, "onload", "loadPage");

Change History (1)

comment:1 Changed 16 years ago by sjmiles

Resolution: invalid
Status: newclosed

In general, clobbering body.onload will break Dojo 0.2+.

Please use dojo.addOnLoad to register a load-time handler. E.g.


Note: See TracTickets for help on using tickets.