mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Clean backdrops when tab is not selected
This commit is contained in:
parent
f563fce5a5
commit
d5d2561979
1 changed files with 10 additions and 4 deletions
|
@ -37,8 +37,11 @@ class Backdrop {
|
||||||
parent.appendChild(backdropImage);
|
parent.appendChild(backdropImage);
|
||||||
|
|
||||||
if (!enableAnimation()) {
|
if (!enableAnimation()) {
|
||||||
if (existingBackdropImage?.parentNode) {
|
if (existingBackdropImage) {
|
||||||
existingBackdropImage.parentNode.removeChild(existingBackdropImage);
|
const backdropContainer = getBackdropContainer();
|
||||||
|
while (backdropContainer.childNodes.length > 1) {
|
||||||
|
backdropContainer.removeChild(backdropContainer.firstChild);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
internalBackdrop(true);
|
internalBackdrop(true);
|
||||||
return;
|
return;
|
||||||
|
@ -51,8 +54,11 @@ class Backdrop {
|
||||||
if (backdropImage === self.currentAnimatingElement) {
|
if (backdropImage === self.currentAnimatingElement) {
|
||||||
self.currentAnimatingElement = null;
|
self.currentAnimatingElement = null;
|
||||||
}
|
}
|
||||||
if (existingBackdropImage?.parentNode) {
|
if (existingBackdropImage) {
|
||||||
existingBackdropImage.parentNode.removeChild(existingBackdropImage);
|
const backdropContainer = getBackdropContainer();
|
||||||
|
while (backdropContainer.childNodes.length > 1) {
|
||||||
|
backdropContainer.removeChild(backdropContainer.firstChild);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue