Odoc plugins for jon.recoil.org
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix SPA navigation hash scrolling for dotted anchor IDs

Use getElementById instead of querySelector for hash fragment scrolling.
querySelector interprets dots in IDs like #module-LE.val-int32 as class
selectors, causing scroll-to-anchor to silently fail.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+1 -1
+1 -1
src/odoc_jons_plugins_js.ml
··· 287 287 var hash = url.indexOf('#') >= 0 ? '#' + url.split('#')[1] : ''; 288 288 if (hash) { 289 289 setTimeout(function() { 290 - var target = document.querySelector(hash); 290 + var target = document.getElementById(hash.substring(1)); 291 291 if (target) target.scrollIntoView({ behavior: 'smooth', block: 'start' }); 292 292 }, 100); 293 293 } else {