mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-19 03:48:18 -07:00
Fix permanent scrollbar for screensaver
This commit is contained in:
parent
3a692f4ed2
commit
517b69550e
4
src/libraries/screensavermanager.css
Normal file
4
src/libraries/screensavermanager.css
Normal file
@ -0,0 +1,4 @@
|
||||
/* own "noScroll" class to avoid conflicts and the need for a scrollbar manager */
|
||||
.screensaver-noScroll {
|
||||
overflow: hidden !important;
|
||||
}
|
@ -3,6 +3,7 @@ import playbackManager from 'playbackManager';
|
||||
import pluginManager from 'pluginManager';
|
||||
import inputManager from 'inputManager';
|
||||
import * as userSettings from 'userSettings';
|
||||
import 'css!./screensavermanager.css';
|
||||
|
||||
function getMinIdleTime() {
|
||||
// Returns the minimum amount of idle time required before the screen saver can be displayed
|
||||
@ -52,6 +53,8 @@ function ScreenSaverManager() {
|
||||
|
||||
console.debug('Showing screensaver ' + screensaver.name);
|
||||
|
||||
document.body.classList.add('screensaver-noScroll');
|
||||
|
||||
screensaver.show();
|
||||
activeScreenSaver = screensaver;
|
||||
|
||||
@ -69,7 +72,9 @@ function ScreenSaverManager() {
|
||||
function hide() {
|
||||
if (activeScreenSaver) {
|
||||
console.debug('Hiding screensaver');
|
||||
activeScreenSaver.hide();
|
||||
activeScreenSaver.hide().then(() => {
|
||||
document.body.classList.remove('screensaver-noScroll');
|
||||
});
|
||||
activeScreenSaver = null;
|
||||
}
|
||||
|
||||
|
@ -42,6 +42,7 @@ class BackdropScreensaver {
|
||||
this.currentSlideshow.hide();
|
||||
this.currentSlideshow = null;
|
||||
}
|
||||
return Promise.resolve();
|
||||
}
|
||||
}
|
||||
/* eslint-enable indent */
|
||||
|
@ -150,16 +150,21 @@ export default function () {
|
||||
const elem = document.querySelector('.logoScreenSaver');
|
||||
|
||||
if (elem) {
|
||||
const onAnimationFinish = function () {
|
||||
elem.parentNode.removeChild(elem);
|
||||
};
|
||||
return new Promise((resolve) => {
|
||||
const onAnimationFinish = function () {
|
||||
elem.parentNode.removeChild(elem);
|
||||
resolve();
|
||||
};
|
||||
|
||||
if (elem.animate) {
|
||||
const animation = fadeOut(elem, 1);
|
||||
animation.onfinish = onAnimationFinish;
|
||||
} else {
|
||||
onAnimationFinish();
|
||||
}
|
||||
if (elem.animate) {
|
||||
const animation = fadeOut(elem, 1);
|
||||
animation.onfinish = onAnimationFinish;
|
||||
} else {
|
||||
onAnimationFinish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return Promise.resolve();
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user