Opened 10 years ago

Closed 10 years ago

#8241 closed defect (fixed)

ContentPane: problem with destroyDescendants and/or href

Reported by: phraktal Owned by: bill
Priority: high Milestone: 1.3
Component: Dijit Version: 1.2.2
Keywords: Cc:
Blocked By: Blocking:

Description

I've come upon a problem while playing with the href="" feature in widgets. Basically, there is a problem while cleaning up widgets ids.

I have a page set up here where the problem can be seen: http://dojo-test.akayami.homeip.net/test6.html

If you click on the button fast enough, at some point the href does not clean up old contents properly and there is an id collision. This happens especially in cases where the server is a bit slow, and takes time to cough up requested contents.

I think it's some kind of a race condition that is causing the problem.

Please have a look. Also, attached are the test files if the link above does not work (it's not a permanent server).

Attachments (1)

bug.zip (1.2 KB) - added by phraktal 10 years ago.

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by phraktal

Attachment: bug.zip added

comment:1 Changed 10 years ago by bill

Component: GeneralDijit
Milestone: tbd1.3
Owner: changed from anonymous to bill
Status: newassigned
Summary: problem with destroyDescendants and/or hrefContentPane: problem with destroyDescendants and/or href

Hmm, you shouldn't need to call destroyDescendants() directly, although that's probably not what's causing the bug. I'll take a look.

comment:2 Changed 10 years ago by bill

Hi phraktal,

Your test case is rather complicated: An outer ContentPane loads an inner ContentPane via an href, and the inner ContentPane itself loads something by href too.

The problem occurs when the outer ContentPane destroys the inner ContentPane while the inner ContentPane has an in-flight XHR. The inner ContentPane doesn't destroy properly.

So I'll check in a fix to make sure that ContentPane cancels any in-flight XHR on destroy.

I noticed another related issue which I filed as #8252.

comment:3 Changed 10 years ago by bill

Fixed in [16033].

comment:4 Changed 10 years ago by bill

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.