Revert "DEV: FloatKit (#23312)" (#23540)

This reverts commit abcdd8d367e8db430119f847f029e9cc94e62cb6.
This commit is contained in:
Joffrey JAFFEUX
2023-09-12 15:37:16 +02:00
committed by GitHub
parent 93de8c8daa
commit b8cc1072cc
166 changed files with 2490 additions and 5361 deletions

View File

@ -1,13 +0,0 @@
export function getScrollParent(node) {
const isElement = node instanceof HTMLElement;
const overflowY = isElement && window.getComputedStyle(node).overflowY;
const isScrollable = overflowY !== "visible" && overflowY !== "hidden";
if (!node || node === document.documentElement) {
return null;
} else if (isScrollable && node.scrollHeight >= node.clientHeight) {
return node;
}
return getScrollParent(node.parentNode) || window;
}