fix(interactive-fieldset): small fix

This commit is contained in:
Johannes Eder 2021-07-13 12:39:51 +02:00 committed by Sarah Vaupel
parent 40283e348b
commit 4c2c68327e
2 changed files with 8 additions and 2 deletions

View File

@ -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();
}

View File

@ -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;