Opened 12 years ago

Closed 12 years ago

Last modified 9 years ago

#5736 closed defect (fixed)

DateTextBox: dropdown not getting destroyed inside ContentPane

Reported by: ctheiss@… Owned by: Douglas Hays
Priority: high Milestone: 1.1
Component: Dijit - Form Version: 1.0
Keywords: Cc:
Blocked By: Blocking:

Description

Although this happens for several widgets with popups (modal dialog, menu, popupmenuitem, etc.), a good example is DateTextBox?. If it is a subwidget of a contentpane, and that contentpane is given different content, then the _Calendar widget is not destroyed along with the DateTextBox? widget.

This could be alleviated by adding the following to the DateTextBox? destroy method:

    this._picker.destroy();

This occurs because ContentPane? destroys everything returned by getDescendants, but popup widgets are specifically attached to the document / body.

Change History (4)

comment:1 Changed 12 years ago by Adam Peller

Milestone: 1.0.31.1

comment:2 Changed 12 years ago by bill

Cc: ctheiss@… removed
Owner: set to Douglas Hays
Reporter: changed from guest to ctheiss@…
Summary: Widget popups not getting destroyed inside ContentPaneDateTextBox: dropdown not getting destroyed inside ContentPane

Yup, this code is already in DropDownButton? (#4902) , guess we forgot it for DateTextBox?. DropDownButton? has:

	destroyDescendants: function(){
		if(this.dropDown){
			this.dropDown.destroyRecursive();
			delete this.dropDown;
		}
		this.inherited(arguments);
	},

As for modal dialog and menu, those are already covered in #3300.

comment:3 Changed 12 years ago by Douglas Hays

Resolution: fixed
Status: newclosed

(In [12243]) Fixes #5736 !strict. Added destroy() method for _DateTimeTextBox.js to delete this._picker.

comment:4 Changed 9 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.