mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-21 23:05:46 +00:00
fix(queue): revert auto-scroll target back to queueIndex+1
The queue-current-track section already shows the active track above the list. Scrolling to queueIndex+1 (next track) is the correct behavior — it keeps the upcoming tracks in view, not the already-visible current one. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -333,7 +333,7 @@ export default function QueuePanel() {
|
|||||||
if (!queueListRef.current || queueIndex < 0) return;
|
if (!queueListRef.current || queueIndex < 0) return;
|
||||||
if (activeTab !== 'queue') return;
|
if (activeTab !== 'queue') return;
|
||||||
const songs = queueListRef.current!.querySelectorAll<HTMLElement>('[data-queue-idx]');
|
const songs = queueListRef.current!.querySelectorAll<HTMLElement>('[data-queue-idx]');
|
||||||
const nextSong = songs[queueIndex];
|
const nextSong = songs[queueIndex + 1];
|
||||||
if (!nextSong) return;
|
if (!nextSong) return;
|
||||||
nextSong.scrollIntoView({ block: "start", behavior: "instant" });
|
nextSong.scrollIntoView({ block: "start", behavior: "instant" });
|
||||||
}, [currentTrack, activeTab]);
|
}, [currentTrack, activeTab]);
|
||||||
|
|||||||
Reference in New Issue
Block a user