Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#13552 closed defect (fixed)

TabContainer: destroyDescendants() selects every tab [and fetching from href] right before destroying it

Reported by: yiqin yu Owned by: bill
Priority: high Milestone: 1.7
Component: Dijit Version: 1.6.0
Keywords: Cc:
Blocked By: Blocking:

Description

This ticket comes from the discussion in http://dojo-toolkit.33424.n3.nabble.com/Set-preload-false-not-working-when-programmatically-creating-a-content-pane-as-a-hidden-child-of-a-tr-td3196970.html#a3202290

I have a tabcontainer which has two children, in which the hidden one's preload is set to false.

<div id="container" dojoType="dijit.layout.TabContainer?" style="width:1000px;height:400px;">

<div dojoType="dijit.layout.ContentPane?" title ="22222" style="width: 200px;">2222</div> <div id="ttt" dojoType="Test" title="Space" preload="false">

This is a customized content pane.

</div>

</div>

When I click the button "Replace current tabs" without clicking the hidden tab firstly, all tabs in the tab container are destroyed and new tabs are then inserted. Here the error occurred: Error: xhr cancelled.

Testing case is attached.

Attachments (2)

test0727.html (3.8 KB) - added by yiqin yu 8 years ago.
test0727-2.html (20 bytes) - added by yiqin yu 8 years ago.
Put these two file in the same folder, and run test0727.html

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by yiqin yu

Attachment: test0727.html added

Changed 8 years ago by yiqin yu

Attachment: test0727-2.html added

Put these two file in the same folder, and run test0727.html

comment:1 Changed 8 years ago by bill

Component: GeneralDijit
Milestone: tbd1.7
Owner: set to bill
Status: newassigned
Summary: xhr cancelled error occurred when calling tabcontainer's destroyDescendants() which has a child contentpane with preload= falseTabContainer: destroyDescendants() selects every tab [and fetching from href] right before destroying it

OK, I'll fix. Note that the problem is restricted to TabContainer.destroyDescendants(). TabContainer.destroyRecursive() doesn't have this issue.

comment:2 Changed 8 years ago by bill

Resolution: fixed
Status: assignedclosed

In [26092]:

Fix bug where TabContainer.destroyDescendants() would select each child right before destroying it, probably causing many screen redraws and also triggering the XHR request for tabs with href's. Fixes #13552 !strict.

comment:3 Changed 7 years ago by bill

In [27138]:

Fix regression from [26092] where StackContainer._selectedChildWidget doesn't get cleared on destroyDescendants(), leading to an exception if StackContainer.resize() is subsequently called. Possibly other problems too. Exception originally showed up in TabContainer.html test on IE9 when the document mode (in IE developer console) was set to IE7 standards, since the window was getting on onresize event (even though the window size hasn't changed). Refs #13552, fixes regression on trunk/, !strict. comment:4 Changed 4 months ago by bill

In [27139]:

Fix regression from [26092] where StackContainer._selectedChildWidget doesn't get cleared on destroyDescendants(), leading to an exception if StackContainer.resize() is subsequently called. Possibly other problems too. Exception originally showed up in TabContainer.html test on IE9 when the document mode (in IE developer console) was set to IE7 standards, since the window was getting on onresize event (even though the window size hasn't changed). Refs #13552, fixes regression on 1.7/ branch, !strict.

Note: See TracTickets for help on using tickets.