dropdown.dispose() does not remove event listeners
Created by: jirikanda
Dropdown has a dispose() function which contains:
super.dispose()
EventHandler.off(this._element, EVENT_KEY)
...
Unfortunatelly, in the base class BaseComponent there is the dispose() function which contains
Data.removeData(this._element, this.constructor.DATA_KEY)
this._element = null
When dropdown dispose() function is called
- this._element is set to null in the super.dispose()
- EventHandler.off function(...) cannot remove event listener because the this._element is null.