From 5959333c4add4b2ee0a5e3991a50775eaed54ebf Mon Sep 17 00:00:00 2001 From: "russell@unturf.com" Date: Sun, 8 Mar 2026 00:03:10 -0500 Subject: [PATCH] Prevent demo anchor links from scrolling to page top in styleguide --- styleguide.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/styleguide.html b/styleguide.html index 817e0b2..0c1b965 100644 --- a/styleguide.html +++ b/styleguide.html @@ -1153,6 +1153,11 @@ var observer = new IntersectionObserver(function(entries) { document.querySelectorAll('.reveal, .reveal-scale').forEach(function(el) { observer.observe(el); }); + +// Prevent href="#" demo links from scrolling to top +document.querySelectorAll('a[href="#"]').forEach(function(a) { + a.addEventListener('click', function(e) { e.preventDefault(); }); +});