From 5261c48a90942681ed77089a224282091fca6629 Mon Sep 17 00:00:00 2001 From: John Factotum <50942278+johnfactotum@users.noreply.github.com> Date: Sat, 3 Jun 2023 01:26:35 +0800 Subject: [PATCH] Paginator: account for margin when getting visible area in scrolled mode Follows 17fb71943f8697cbae4a7b5f68b4623d76ae6029 --- paginator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paginator.js b/paginator.js index 21551a5..c47fbe3 100644 --- a/paginator.js +++ b/paginator.js @@ -796,7 +796,7 @@ export class Paginator extends HTMLElement { } #getVisibleRange() { if (this.scrolled) return getVisibleRange(this.#view.document, - this.start, this.end, this.#getRectMapper()) + this.start + this.#margin, this.end - this.#margin, this.#getRectMapper()) const size = this.#rtl ? -this.size : this.size return getVisibleRange(this.#view.document, this.start - size, this.end - size, this.#getRectMapper())