From 2d2ca357c1bbc306112038ddf3daa7eeba7bb5f8 Mon Sep 17 00:00:00 2001 From: LJQ Date: Fri, 24 May 2024 21:32:20 +0800 Subject: [PATCH] Sync focus with current playing lyrics --- src/controllers/lyrics.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/controllers/lyrics.js b/src/controllers/lyrics.js index bb075da709..b652b63f83 100644 --- a/src/controllers/lyrics.js +++ b/src/controllers/lyrics.js @@ -14,6 +14,7 @@ import Events from '../utils/events.ts'; import '../styles/lyrics.scss'; import { AutoScrollType } from './lyrics.types'; +import focusManager from 'components/focusManager'; let currentPlayer; let currentItem; @@ -76,6 +77,7 @@ export default function (view) { if (autoScroll !== AutoScrollType.NoScroll) { // instant scroll is used when the view is first loaded scrollManager.scrollToElement(lyric, autoScroll === AutoScrollType.Smooth); + focusManager.focus(lyric); autoScroll = AutoScrollType.Smooth; } }