Opened 10 years ago

Closed 10 years ago

#8909 closed defect (fixed)

ContentPane: null domNode when ContentPane has refreshOnShow=true inside a TabContainer

Reported by: cburghduff Owned by: bill
Priority: high Milestone: 1.3
Component: Dijit Version: 1.3.0b3
Keywords: Cc:
Blocked By: Blocking:

Description

I modified the dijit/tests/layout/test_TabContainer.html file as follows:

  1. id="tab2" added refreshOnShow=true
  2. added refreshOnShow=true to tab with href="tab3.html". Also changed from a LinkPane? to a ContentPane?( The error also occurs on LinkPanes?.

Then I did the following:

  1. Click the "Sub TabContainer? from href" tab
  2. Click the "Inlined Sub TabContainer?" tab
  3. Click back on the "Sub TabContainer? from href" tab

You get a javascript error at line 901(var n = node.tagName ) of dojo/_base/html.js because node is null. This is in the dojo._usesBorderBox function.

Change History (3)

comment:1 Changed 10 years ago by bill

Owner: set to bill
Status: newassigned

Ah good one.... looks like the "Sub TabContainer? from href" tab is trying to reload it's child and resize it's child at the same time, but that fails since while it's reloading, there's nothing to resize.

comment:2 Changed 10 years ago by bill

Milestone: tbd1.3
Summary: null domNode when ContentPane has refreshOnShow=true inside a TabContainerContentPane: null domNode when ContentPane has refreshOnShow=true inside a TabContainer

If a ContentPane has a single child it sets this._singleChildWidget to point to that child.

When attr('href', ...) is called (or similar effect from the refreshOnShow=true property), the ContentPane wipes out it's old contents (in preparation for the new contents), and starts an XHR. However (the bug is that) _singleChildWidget isn't cleared at that point.

Then TabContainer calls ContentPane.resize(), and ContentPane tries to reference that stale variable.

ContentPane does correctly set or clear _singleChildWidget when the XHR returns it's data. However, the race condition is that the resize() occurs while the XHR is in progress.

comment:3 Changed 10 years ago by bill

Resolution: fixed
Status: assignedclosed

Fixed in [17044] yesterday.

Note: See TracTickets for help on using tickets.