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 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(); }