1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Add comments for future reference

This commit is contained in:
ferferga 2020-05-14 14:18:50 +02:00
parent 6250f5bca8
commit 26267e3827
2 changed files with 4 additions and 0 deletions

View file

@ -109,6 +109,7 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
function hidePrePlaybackPage() { function hidePrePlaybackPage() {
let animatedPage = document.querySelector('.page:not(.hide)'); let animatedPage = document.querySelector('.page:not(.hide)');
animatedPage.classList.add('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
document.getElementsByTagName('body')[0].style = null; document.getElementsByTagName('body')[0].style = null;
} }

View file

@ -137,6 +137,7 @@ define(['apphost', 'userSettings', 'browser', 'events', 'pluginManager', 'backdr
function onViewBeforeShow(e) { function onViewBeforeShow(e) {
if (e.detail && e.detail.type === 'video-osd') { if (e.detail && e.detail.type === 'video-osd') {
// This removes the space that the scrollbar takes while playing a video
document.getElementsByTagName('body')[0].style = null; document.getElementsByTagName('body')[0].style = null;
return; return;
} }
@ -156,6 +157,8 @@ define(['apphost', 'userSettings', 'browser', 'events', 'pluginManager', 'backdr
} }
} }
} }
// This keeps the scrollbar always present in all pages, so we avoid clipping while switching between pages
// that need the scrollbar and pages that don't.
document.getElementsByTagName('body')[0].style = 'overflow-y: scroll'; document.getElementsByTagName('body')[0].style = 'overflow-y: scroll';
} }