MCPcopy Create free account
hub / github.com/ionic-team/ionic-framework / getScrollData

Function getScrollData

core/src/utils/input-shims/hacks/scroll-data.ts:12–25  ·  view source on GitHub ↗
(
  componentEl: HTMLElement,
  contentEl: HTMLElement,
  keyboardHeight: number,
  platformHeight: number
)

Source from the content-addressed store, hash-verified

10}
11
12export const getScrollData = (
13 componentEl: HTMLElement,
14 contentEl: HTMLElement,
15 keyboardHeight: number,
16 platformHeight: number
17): ScrollData => {
18 const itemEl = (componentEl.closest('ion-item,[ion-item]') as HTMLElement) ?? componentEl;
19 return calcScrollData(
20 itemEl.getBoundingClientRect(),
21 contentEl.getBoundingClientRect(),
22 keyboardHeight,
23 platformHeight
24 );
25};
26
27const calcScrollData = (
28 inputRect: ClientRect,

Callers 1

jsSetFocusFunction · 0.90

Calls 1

calcScrollDataFunction · 0.85

Tested by

no test coverage detected