fix(interactive-fieldset): small fix
This commit is contained in:
parent
40283e348b
commit
4c2c68327e
@ -8,7 +8,7 @@ export const EVENT_TYPE = {
|
||||
SUBMIT : 'submit',
|
||||
INPUT : 'input',
|
||||
FOCUS_OUT : 'focusout',
|
||||
//more to be added
|
||||
BEFOREUNLOAD : 'beforeunload',
|
||||
};
|
||||
|
||||
|
||||
@ -47,6 +47,12 @@ export class EventManager {
|
||||
|
||||
removeAllObserversFromUtil() {
|
||||
this._mutationObservers.forEach((observer) => observer.disconnect());
|
||||
this.mutationObservers = [];
|
||||
}
|
||||
|
||||
cleanUp() {
|
||||
this.removeAllObserversFromUtil();
|
||||
this.removeAllEventListenersFromUtil();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ export class InteractiveFieldset {
|
||||
|
||||
this._element = element;
|
||||
|
||||
this._eventManger = new EventManager();
|
||||
this._eventManager = new EventManager();
|
||||
|
||||
if (this._element.classList.contains(INTERACTIVE_FIELDSET_INITIALIZED_CLASS)) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user