#17275 closed defect (fixed)
(1.8.4 +) dijit._HasDropDown.destroy should notify popupManager to clean dead refs
Reported by: | Claude Guyomard | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | 1.10 |
Component: | Dijit | Version: | 1.8.4 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
dijit._HasDropDown exposes methods to open and close a popup containing the dropDown content. These methods delegate to the popup manager. When a _HasDropDown instance is being destroyed, it should help the popup manager to remove its own references on this disappearing _HasDropDown.
An use-case of this is Single Page Applications.
But also, more generally, just the simple case of destroying such a _HasDropDown instance should notify the popup manager about its destruction simply in order to avoid to keep dead references.
Another a warning : Here we met another problem with a child class. I did not check whether this problem occurs on pure Dojo components : When opening a new DropDown?, the previous popup on the stack is processed (closing, properties change, ...). But data of the previous popup is now incomplete and produce an error in the following lines :
onClose: function(){
domAttr.set(self._popupStateNode, "popupActive", false); domClass.remove(self._popupStateNode, "dijitHasDropDownOpen");
self._set("_opened", false); use set() because _CssStateMixin is watching
}
because self._popupStateNode is null now.
An simple idea to solve this : dijit._HasDropDown.destroy() should call "this.closeDropDown()".
Hope that it helps.
Regards
Change History (2)
comment:1 Changed 9 years ago by
Owner: | set to Bill Keese <[email protected]…> |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:2 Changed 9 years ago by
Milestone: | tbd → 1.10 |
---|
In 697870d0ef70e56724959f69052c2ffff4576efa/dijit: