mirror of
https://github.com/meowarex/TidaLuna-Plugins.git
synced 2026-06-17 19:33:10 +10:00
Fix Scroll break on large lyric count
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user