remove the auto-created menu from the DOM after it disappears, to save memory

This commit is contained in:
Michael Becker 2024-01-20 00:52:53 -05:00
parent b12271ce21
commit 63c16be86d

View File

@ -66,6 +66,13 @@ function ContextMenu()
e.stopPropagation();
return false;
});
elem.addEventListener("transitionend", function(e)
{
if (!System.ClassList.Contains(this, "uwt-visible"))
{
this.remove();
}
});
for (var i = 0; i < this.Items.length; i++)
{