Changes between Initial Version and Version 2 of Ticket #11910


Ignore:
Timestamp:
Dec 7, 2010, 5:04:18 AM (9 years ago)
Author:
bill
Comment:

@jburke - That would solve half (or most) of the problem, but a problem would still happen when the app specifies id's for all of it's widgets.

@rafael.coutinho - When you say that

dijit.findWidgets(dojo.body() returns ALL widgets in body

I assume you mean that it returns a sparse array with undefined for widgets from the other dojo version. Does that sound right?

findWidgets() has this code, which I think just needs to check that the id is in hash rather than assuming it is:

var widgetId = node.getAttribute("widgetId");
if(widgetId){
	outAry.push(hash[widgetId]);
}else{

It should be changed to something like:

var widgetId = node.getAttribute("widgetId"),
	widget = widgetId && hash[widgetId],
if(widget){
	outAry.push(widget);
}else{

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11910

    • Property Owner changed from anonymous to bill
    • Property Status changed from new to assigned
    • Property Component changed from General to Dijit
    • Property Milestone changed from tbd to 1.6
  • Ticket #11910 – Description

    initial v2  
    33The problem is that when we are unloading the page in IE 7 the method dijit._destroyAll breaks. It breaks because it tries to destroy widgets that are actually declared in the other dojo.
    44The dijit_destroyAll section that is breaking is as below:
    5 
    6 ''// Destroy all the widgets, top down
     5{{{
     6// Destroy all the widgets, top down
    77        dojo.forEach(dijit.findWidgets(dojo.body()), function(widget){
    88                // Avoid double destroy of widgets like Menu that are attached to body
     
    1616                }
    1717        });
    18 
    19 ''
     18}}}
    2019[[BR]]
    2120