Use classes instead
This commit is contained in:
parent
26267e3827
commit
029c7382db
3 changed files with 7 additions and 3 deletions
|
@ -120,3 +120,7 @@ div[data-role=page] {
|
||||||
.headroom--unpinned {
|
.headroom--unpinned {
|
||||||
transform: translateY(-100%);
|
transform: translateY(-100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.force-scroll {
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
|
|
|
@ -110,7 +110,7 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
||||||
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
|
// 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.body.classList.remove('force-scroll');
|
||||||
}
|
}
|
||||||
|
|
||||||
function zoomIn(elem) {
|
function zoomIn(elem) {
|
||||||
|
|
|
@ -138,7 +138,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
|
// This removes the space that the scrollbar takes while playing a video
|
||||||
document.getElementsByTagName('body')[0].style = null;
|
document.body.classList.remove('force-scroll');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ define(['apphost', 'userSettings', 'browser', 'events', 'pluginManager', 'backdr
|
||||||
}
|
}
|
||||||
// This keeps the scrollbar always present in all pages, so we avoid clipping while switching between pages
|
// 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.
|
// that need the scrollbar and pages that don't.
|
||||||
document.getElementsByTagName('body')[0].style = 'overflow-y: scroll';
|
document.body.classList.add('force-scroll');
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener('viewshow', onViewBeforeShow);
|
document.addEventListener('viewshow', onViewBeforeShow);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue