mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix guide scroll rubber banding on ios
This commit is contained in:
parent
a8c3ec87ea
commit
672f3f4e85
3 changed files with 17 additions and 1 deletions
|
@ -465,3 +465,8 @@
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.noRubberBanding {
|
||||||
|
/* This is needed to combat the rubber banding in iOS */
|
||||||
|
padding-bottom: 100px;
|
||||||
|
}
|
||||||
|
|
|
@ -841,7 +841,7 @@
|
||||||
require(['scrollHelper'], function (scrollHelper) {
|
require(['scrollHelper'], function (scrollHelper) {
|
||||||
|
|
||||||
var fn = enabled ? 'on' : 'off';
|
var fn = enabled ? 'on' : 'off';
|
||||||
scrollHelper.centerFocus[fn](view.querySelector('.smoothScrollY'), false);
|
scrollHelper.centerFocus[fn](view.querySelector('.guideVerticalScroller'), false);
|
||||||
scrollHelper.centerFocus[fn](view.querySelector('.programGrid'), true);
|
scrollHelper.centerFocus[fn](view.querySelector('.programGrid'), true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -936,6 +936,16 @@
|
||||||
|
|
||||||
programGrid.addEventListener('focus', onProgramGridFocus, true);
|
programGrid.addEventListener('focus', onProgramGridFocus, true);
|
||||||
|
|
||||||
|
if (browser.iOS || browser.osx) {
|
||||||
|
context.querySelector('.channelsContainer').classList.add('noRubberBanding');
|
||||||
|
|
||||||
|
var programGridContainer = context.querySelector('.programGridContainer');
|
||||||
|
|
||||||
|
programGridContainer.classList.add('noRubberBanding');
|
||||||
|
programGridContainer.classList.remove('smoothScrollX');
|
||||||
|
programGridContainer.classList.add('hiddenScrollX');
|
||||||
|
}
|
||||||
|
|
||||||
dom.addEventListener(programGrid, 'scroll', function (e) {
|
dom.addEventListener(programGrid, 'scroll', function (e) {
|
||||||
onProgramGridScroll(context, this, timeslotHeaders);
|
onProgramGridScroll(context, this, timeslotHeaders);
|
||||||
}, {
|
}, {
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
<div class="programGridContainer programGrid smoothScrollX guideScroller" style="white-space: nowrap;">
|
<div class="programGridContainer programGrid smoothScrollX guideScroller" style="white-space: nowrap;">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="guideRequiresUnlock hide">
|
<div class="guideRequiresUnlock hide">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue