Render preview bar behind scrubber

This commit is contained in:
Ajay Ramachandran
2021-10-30 21:48:52 -04:00
parent c7acb902a4
commit b4a2f31520
3 changed files with 7 additions and 5 deletions

View File

@@ -158,8 +158,6 @@ class PreviewBar {
this.parent.addEventListener("mouseleave", () => this.container.classList.remove("hovered"));
}
// On the seek bar
this.parent.prepend(this.container);
}
@@ -323,7 +321,11 @@ class PreviewBar {
}
originalSectionClone.remove();
progressBar.prepend(newChapterBar);
if (this.container?.parentElement === progressBar) {
progressBar.insertBefore(newChapterBar, this.container.nextSibling);
} else {
progressBar.prepend(newChapterBar);
}
// Hide old bar
chapterBar.style.display = "none";