mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-19 11:58:20 -07:00
Fix playback of tv show or playlist and restoring of scrollbar after history back
This commit is contained in:
parent
5787069b31
commit
47f6d198b6
@ -103,9 +103,7 @@ function tryRemoveElement(elem) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function hidePrePlaybackPage() {
|
function hideScroll() {
|
||||||
const animatedPage = document.querySelector('.page:not(.hide)');
|
|
||||||
animatedPage.classList.add('hide');
|
|
||||||
// At this point, we must hide the scrollbar placeholder, so it's not being displayed while the item is being loaded
|
// At this point, we must hide the scrollbar placeholder, so it's not being displayed while the item is being loaded
|
||||||
document.body.classList.add('hide-scroll');
|
document.body.classList.add('hide-scroll');
|
||||||
}
|
}
|
||||||
@ -1329,7 +1327,7 @@ function tryRemoveElement(elem) {
|
|||||||
this.#mediaElement = videoElement;
|
this.#mediaElement = videoElement;
|
||||||
|
|
||||||
if (options.fullscreen) {
|
if (options.fullscreen) {
|
||||||
hidePrePlaybackPage();
|
hideScroll();
|
||||||
}
|
}
|
||||||
|
|
||||||
// don't animate on smart tv's, too slow
|
// don't animate on smart tv's, too slow
|
||||||
@ -1344,7 +1342,7 @@ function tryRemoveElement(elem) {
|
|||||||
} else {
|
} else {
|
||||||
// we need to hide scrollbar when starting playback from page with animated background
|
// we need to hide scrollbar when starting playback from page with animated background
|
||||||
if (options.fullscreen) {
|
if (options.fullscreen) {
|
||||||
hidePrePlaybackPage();
|
hideScroll();
|
||||||
}
|
}
|
||||||
|
|
||||||
return Promise.resolve(dlg.querySelector('video'));
|
return Promise.resolve(dlg.querySelector('video'));
|
||||||
|
Loading…
Reference in New Issue
Block a user