MCPcopy
hub / github.com/ReactTooltip/react-tooltip / isScrollable

Function isScrollable

src/utils/get-scroll-parent.ts:1–10  ·  view source on GitHub ↗
(node: Element)

Source from the content-addressed store, hash-verified

1export const isScrollable = (node: Element) => {
2 if (!(node instanceof HTMLElement || node instanceof SVGElement)) {
3 return false
4 }
5 const style = getComputedStyle(node)
6 return ['overflow', 'overflow-x', 'overflow-y'].some((propertyName) => {
7 const value = style.getPropertyValue(propertyName)
8 return value === 'auto' || value === 'scroll'
9 })
10}
11
12const getScrollParent = (node: Element | null) => {
13 if (!node) {

Callers 2

utils.spec.jsFile · 0.90
getScrollParentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…