mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Sync focus with current playing lyrics
This commit is contained in:
parent
15e35fa45f
commit
2d2ca357c1
1 changed files with 2 additions and 0 deletions
|
@ -14,6 +14,7 @@ import Events from '../utils/events.ts';
|
||||||
|
|
||||||
import '../styles/lyrics.scss';
|
import '../styles/lyrics.scss';
|
||||||
import { AutoScrollType } from './lyrics.types';
|
import { AutoScrollType } from './lyrics.types';
|
||||||
|
import focusManager from 'components/focusManager';
|
||||||
|
|
||||||
let currentPlayer;
|
let currentPlayer;
|
||||||
let currentItem;
|
let currentItem;
|
||||||
|
@ -76,6 +77,7 @@ export default function (view) {
|
||||||
if (autoScroll !== AutoScrollType.NoScroll) {
|
if (autoScroll !== AutoScrollType.NoScroll) {
|
||||||
// instant scroll is used when the view is first loaded
|
// instant scroll is used when the view is first loaded
|
||||||
scrollManager.scrollToElement(lyric, autoScroll === AutoScrollType.Smooth);
|
scrollManager.scrollToElement(lyric, autoScroll === AutoScrollType.Smooth);
|
||||||
|
focusManager.focus(lyric);
|
||||||
autoScroll = AutoScrollType.Smooth;
|
autoScroll = AutoScrollType.Smooth;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue