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

update components

This commit is contained in:
Luke Pulverenti 2016-07-27 01:19:56 -04:00
parent 7ebc536076
commit a1af156757
65 changed files with 2335 additions and 262 deletions

View file

@ -71,10 +71,10 @@
return pos;
}
function addCenterFocus(dlg) {
function centerFocus(elem, horiz, on) {
require(['scrollHelper'], function (scrollHelper) {
scrollHelper.centerFocus.on(dlg.querySelector('.actionSheetScroller'), false);
var fn = on ? 'on' : 'off';
scrollHelper.centerFocus[fn](elem, horiz);
});
}
@ -191,7 +191,7 @@
dlg.innerHTML = html;
if (layoutManager.tv) {
addCenterFocus(dlg);
centerFocus(dlg.querySelector('.actionSheetScroller'), false, true);
}
if (options.showCancel) {
@ -228,6 +228,10 @@
dlg.addEventListener('close', function () {
if (layoutManager.tv) {
centerFocus(dlg.querySelector('.actionSheetScroller'), false, false);
}
if (timeout) {
clearTimeout(timeout);
timeout = null;