New

docx-editor 1.x has shipped. Vue support, i18n, agents. Read the migration guide →

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)

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;

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;