DEV: replaces DOMNodeInserted by the better MutationObserver (#6884)

This commit is contained in:
Joffrey JAFFEUX 2019-03-04 10:28:59 +01:00 committed by GitHub
parent 824d9402a4
commit 075b264338
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -191,7 +191,14 @@ function positioningWorkaround($fixedElement) {
});
}, 100);
fixedElement.addEventListener("DOMNodeInserted", checkForInputs);
const config = {
childList: true,
subtree: true,
attributes: false,
characterData: false
};
const observer = new MutationObserver(checkForInputs);
observer.observe(fixedElement, config);
}
export default positioningWorkaround;