mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: replaces DOMNodeInserted by the better MutationObserver (#6884)
This commit is contained in:
parent
824d9402a4
commit
075b264338
@ -191,7 +191,14 @@ function positioningWorkaround($fixedElement) {
|
|||||||
});
|
});
|
||||||
}, 100);
|
}, 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;
|
export default positioningWorkaround;
|
||||||
|
Loading…
Reference in New Issue
Block a user