mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge branch 'jellyfin:master' into master
This commit is contained in:
commit
2aecd89d6e
40 changed files with 1513 additions and 1241 deletions
|
@ -103,6 +103,8 @@ function centerOnFocusVertical(e) {
|
|||
|
||||
export const centerFocus = {
|
||||
on: function (element, horizontal) {
|
||||
element.setAttribute(`data-scroll-mode-${horizontal ? 'x' : 'y'}`, 'custom');
|
||||
|
||||
if (horizontal) {
|
||||
dom.addEventListener(element, 'focus', centerOnFocusHorizontal, {
|
||||
capture: true,
|
||||
|
@ -116,6 +118,8 @@ export const centerFocus = {
|
|||
}
|
||||
},
|
||||
off: function (element, horizontal) {
|
||||
element.removeAttribute(`data-scroll-mode-${horizontal ? 'x' : 'y'}`);
|
||||
|
||||
if (horizontal) {
|
||||
dom.removeEventListener(element, 'focus', centerOnFocusHorizontal, {
|
||||
capture: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue