mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 01:32:38 +00:00
Fixed DOMSubtreeModified deprecation notice
This commit is contained in:
parent
58eda2f152
commit
cd25284d35
@ -624,9 +624,22 @@ function RefreshLocaleNumberDisplay(rootSelector = "#page-content")
|
||||
});
|
||||
}
|
||||
RefreshLocaleNumberDisplay();
|
||||
$(document).on("DOMSubtreeModified", ".locale-number", function()
|
||||
$(".locale-number").each(function()
|
||||
{
|
||||
$(this).removeClass("number-parsing-done");
|
||||
new MutationObserver(function(mutations)
|
||||
{
|
||||
mutations.forEach(mutation =>
|
||||
{
|
||||
if (mutation.type == "childList" || mutation.type == "attributes")
|
||||
{
|
||||
$(mutation.target).removeClass("number-parsing-done");
|
||||
}
|
||||
});
|
||||
}).observe(this, {
|
||||
attributes: true,
|
||||
childList: true,
|
||||
subtree: true
|
||||
});
|
||||
});
|
||||
|
||||
function RefreshLocaleNumberInput(rootSelector = "#page-content")
|
||||
|
Loading…
x
Reference in New Issue
Block a user