API Referencev1.0.2
@eigenpal/docx-editor-core/utils/findVerticalScrollParent
Pure DOM helpers — locate the element that vertically scrolls the paginated editor. Lifted from packages/react/src/paged-editor/ findVerticalScrollParent.ts so both adapters use the same logic for scroll-to-position, arrow-key line navigation, and drag auto-scroll.
Functions(2)
fn
packages/core/src/utils/findVerticalScrollParent.ts:18findVerticalScrollParent
First ancestor of `el` with `overflow-y: auto|scroll` and a scrollable overflow height. Walk starts at `el.parentElement` (does not treat `el` itself as the scroller).
declare function findVerticalScrollParent(el: HTMLElement): HTMLElement | null;fn
packages/core/src/utils/findVerticalScrollParent.ts:38findVerticalScrollParentOrRoot
Same as [findVerticalScrollParent](findVerticalScrollParent) but falls back to `document.documentElement` so callers always get a valid scroll target (matches legacy `scrollIntoView` root).
declare function findVerticalScrollParentOrRoot(el: HTMLElement): HTMLElement;