From 329e22227a9d1940db149a6790c57df0caa3e2ab Mon Sep 17 00:00:00 2001 From: John Factotum <50942278+johnfactotum@users.noreply.github.com> Date: Tue, 24 Sep 2024 11:36:43 +0800 Subject: [PATCH] Paginator: fix offset What's `margin` doing here?! It's like this since the first commit, but it makes no sense... I think I added it incorrectly, being misled by the getBoundingClientRect bug in Firefox... --- paginator.js | 1 - 1 file changed, 1 deletion(-) diff --git a/paginator.js b/paginator.js index c1a8efe..3e21920 100644 --- a/paginator.js +++ b/paginator.js @@ -816,7 +816,6 @@ export class Paginator extends HTMLElement { return this.#scrollTo(offset, reason) } const offset = this.#getRectMapper()(rect).left - + this.#margin / 2 return this.#scrollToPage(Math.floor(offset / this.size) + (this.#rtl ? -1 : 1), reason) } async #scrollTo(offset, reason, smooth) {