mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #1229 from ferferga/scrollbar-placeholder
Keep scrollbar always present to avoid UI clipping
This commit is contained in:
commit
8f85ca24fb
4 changed files with 21 additions and 0 deletions
|
@ -137,6 +137,8 @@ define(['apphost', 'userSettings', 'browser', 'events', 'backdrop', 'globalize',
|
|||
|
||||
function onViewBeforeShow(e) {
|
||||
if (e.detail && e.detail.type === 'video-osd') {
|
||||
// This removes the space that the scrollbar takes while playing a video
|
||||
document.body.classList.remove('force-scroll');
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -155,6 +157,9 @@ define(['apphost', 'userSettings', 'browser', 'events', 'backdrop', 'globalize',
|
|||
}
|
||||
}
|
||||
}
|
||||
// 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.body.classList.add('force-scroll');
|
||||
}
|
||||
|
||||
document.addEventListener('viewshow', onViewBeforeShow);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue