mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
fix guide scroll rubber banding on ios
This commit is contained in:
parent
a8c3ec87ea
commit
672f3f4e85
@ -465,3 +465,8 @@
|
||||
padding: 1em;
|
||||
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) {
|
||||
|
||||
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);
|
||||
});
|
||||
}
|
||||
@ -936,6 +936,16 @@
|
||||
|
||||
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) {
|
||||
onProgramGridScroll(context, this, timeslotHeaders);
|
||||
}, {
|
||||
|
@ -28,6 +28,7 @@
|
||||
<div class="programGridContainer programGrid smoothScrollX guideScroller" style="white-space: nowrap;">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="guideRequiresUnlock hide">
|
||||
|
Loading…
Reference in New Issue
Block a user