Opened 9 years ago

Closed 9 years ago

#16267 closed defect (fixed)

StackContainer: calls child.onClose() but that method may not be defined

Reported by: bill Owned by: bill
Priority: undecided Milestone: 1.9
Component: Dijit Version: 1.8.1
Keywords: Cc:
Blocked By: Blocking:


StackContainer widget has a method called "closeChild" which assumes that the "page" parameter being closed has a method called "onClose". However, the "page" can be any widget and some widgets do not have this function.

onClose() is defined in _Widget.js, but not in _WidgetBase.js, so either the StackContainer code should be changed to check for onClose()'s existence, or the definition of onClose() should be moved to _WidgetBase.

Note also that popup.js checks for the existence of onClose(), although it's calling onClose() to indicate that the widget was hidden, which is not the nuance of onClose() for a tab.

Change History (2)

comment:1 Changed 9 years ago by bill

Milestone: tbd1.9
Status: newassigned

comment:2 Changed 9 years ago by bill

Resolution: fixed
Status: assignedclosed

In [29901]:

Check that onClose() is defined before calling it, fixes #16267 !strict.

Note: See TracTickets for help on using tickets.