MCPcopy Create free account
hub / github.com/UI5/webcomponents / isScrollable

Function isScrollable

packages/base/src/util/FocusableElements.ts:12–17  ·  view source on GitHub ↗
(el: HTMLElement)

Source from the content-addressed store, hash-verified

10};
11
12const isScrollable = (el: HTMLElement) => {
13 const computedStyle = getComputedStyle(el);
14
15 return (el.scrollHeight > el.clientHeight && ["scroll", "auto"].indexOf(computedStyle.overflowY) >= 0)
16 || (el.scrollWidth > el.clientWidth && ["scroll", "auto"].indexOf(computedStyle.overflowX) >= 0);
17};
18
19const getFirstFocusableElement = async (container: HTMLElement, startFromContainer?: boolean): FocusableElementPromise => {
20 if (!container || isElementHidden(container)) {

Callers 1

findFocusableElementFunction · 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…