forked from akai/readest
fix: don't autoscroll to current item in TOC when TTS is on (#311)
This commit is contained in:
@@ -120,7 +120,7 @@ const TOCView: React.FC<{
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (!progress) return;
|
||||
if (!progress || eventDispatcher.dispatchSync('tts-is-speaking')) return;
|
||||
const { sectionHref: currentHref } = progress;
|
||||
const hrefMd5 = currentHref ? getContentMd5(currentHref) : '';
|
||||
const currentItem = viewRef.current?.querySelector(`[data-href="${hrefMd5}"]`);
|
||||
|
||||
Reference in New Issue
Block a user