From 57579b29f432eebfde10d6dae922a4382aa821b6 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Fri, 6 Nov 2026 17:00:51 +0100 Subject: [PATCH 1/2] Fix back-to-top button not appearing at page bottom in Firefox The bottom-of-page check in the scroll handler required window.innerHeight + currentScrollTop to reach document.body.offsetHeight exactly. Browsers report sub-pixel scroll positions, so at the bottom of a page whose height is fractional the sum can land a fraction of a pixel below the integer offsetHeight, and the check never passes. This stayed latent until CI moved from Playwright 1.64.1 (Firefox 157) to 1.65.0 (Firefox 159), which shifted the scroll metrics of the book playwright fixture enough to fail the check deterministically on Linux and macOS. Compare against document.documentElement.scrollHeight - 1 instead: the scrollable document height, with a 1px tolerance for sub-pixel scroll positions. --- src/resources/projects/website/navigation/quarto-nav.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/resources/projects/website/navigation/quarto-nav.js b/src/resources/projects/website/navigation/quarto-nav.js index 8b12432c71c..b1e897a5242 100644 --- a/src/resources/projects/website/navigation/quarto-nav.js +++ b/src/resources/projects/website/navigation/quarto-nav.js @@ -76,7 +76,9 @@ window.document.addEventListener("DOMContentLoaded", function () { hideBackToTop(); } else if ( window.innerHeight + currentScrollTop >= - document.body.offsetHeight + // 1px tolerance: sub-pixel scroll positions (e.g. Firefox) can + // stop a fraction short of the document height at the bottom + document.documentElement.scrollHeight - 1 ) { showBackToTop(); } From 48e7ff921abed31ea2860b8b2baca202406c7267 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Fri, 6 Nov 2026 17:05:33 +0100 Subject: [PATCH 2/2] Add changelog entry for #15313 --- news/changelog-1.11.md | 1 + 1 file changed, 1 insertion(+) diff --git a/news/changelog-1.11.md b/news/changelog-1.11.md index cf3527c49f2..d9e1f62d4b0 100644 --- a/news/changelog-1.11.md +++ b/news/changelog-1.11.md @@ -151,6 +151,7 @@ All changes included in 1.11: - ([#15114](https://github.com/quarto-dev/quarto-cli/pull/15114)): Fix a website category containing backticks showing broken text in the page title block, and a category containing a backslash, such as a Windows path, failing the render or losing its backslashes. - ([#15206](https://github.com/quarto-dev/quarto-cli/issues/15206)): Fix website listings attaching another update handler on every URL hash change, and an extra one per additional listing on the same page. - ([#15217](https://github.com/quarto-dev/quarto-cli/pull/15217)): Fix website listings updating twice for each click on a pagination link. +- ([#15313](https://github.com/quarto-dev/quarto-cli/pull/15313)): Fix the back-to-top button not appearing when scrolling to the bottom of a page in Firefox, where sub-pixel scroll positions could leave the bottom-of-page check a fraction of a pixel short. ## Lua API