Opened 8 years ago
Closed 8 years ago
#18275 closed defect (duplicate)
dojox/layout/ContentPane closing error
Reported by: | alex108 | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | DojoX Layout | Version: | 1.10.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
There is an error in case of using dojox/layout/ContentPane as closabled container in dijit/layout/TabContainer. In case of press "Close" (x) button on tab, the following error message displayed in Firebug:
TypeError?: setter.teardown is not a function setter.teardown(); ContentPane?.js (строка 97)
The existing problematic dojox/layout/ContentPane code is following:
destroy: function () {
var setter = this._contentSetter; if (setter) {
setter.teardown();
} this.inherited(arguments);
}
so the error occured as setter.teardown() method not exists. The workaround of this problem is to add setter.teardown() method checking as follows:
destroy: function () {
var setter = this._contentSetter; if (setter) {
if ('teardown' in setter) {
setter.teardown();
}
} this.inherited(arguments);
}
Duplicate of #18266.