Fix Scroll break on large lyric count

This commit is contained in:
2026-04-02 23:02:54 +11:00
parent a45a834580
commit 306ab3a862
+4 -7
View File
@@ -3415,13 +3415,10 @@ const findScroller = (el: HTMLElement): HTMLElement => {
while (parent) { while (parent) {
if (boundary && !boundary.contains(parent)) break; if (boundary && !boundary.contains(parent)) break;
const style = window.getComputedStyle(parent); const style = window.getComputedStyle(parent);
if ( const oy = style.overflowY;
style.overflowY === "auto" || const o = style.overflow;
style.overflowY === "scroll" || const scrollable = oy === "auto" || oy === "scroll" || o === "auto" || o === "scroll";
style.overflow === "auto" || if (scrollable || ((oy === "hidden" || o === "hidden") && parent.scrollHeight > parent.clientHeight + 1)) {
style.overflow === "scroll" ||
parent.scrollHeight > parent.clientHeight + 1
) {
return parent; return parent;
} }
parent = parent.parentElement; parent = parent.parentElement;