You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Progress bar script throws "Cannot read properties of null" on every page (invalid selector in general_scripts.html) #800
Describe the bug
Every page of the Interactive Book throws an uncaught TypeError on scroll:
"Cannot read properties of null (reading 'getBoundingClientRect')" at
animateProgressBar. As a result, the reading progress bar at the top of
the page never fills in — it stays stuck at 0% width.
Expected behavior
The progress bar should fill smoothly as the user scrolls, with no console errors.
Desktop:
OS: macOS
Browser: Chrome
Version: [check chrome://version if you want exact number]
Root cause
In _includes/general_scripts.html, document.querySelector('#main-content-wrap')
uses an id selector, but the actual element only has class="main-content-wrap" —
so the query returns null and every scroll throws.
Proposed fix
Change #main-content-wrap to .main-content-wrap in the querySelector call.
Happy to submit a PR for this.
I'd like to work on resolving this issue. I noticed that PR #801 was previously submitted but closed without being merged.
I'd be happy to investigate the fix, verify the progress bar functionality locally, and submit a fresh PR with the required screenshots and testing evidence.
Activity
lakshaydevoo-arch commentedon Aug 31, 2026
Hey just a follow up asking why my PR is not merged?
Soumya-galkar commentedon Nov 5, 2026
Hi @Shruti2110-coder,
I'd like to work on resolving this issue. I noticed that PR #801 was previously submitted but closed without being merged.
I'd be happy to investigate the fix, verify the progress bar functionality locally, and submit a fresh PR with the required screenshots and testing evidence.
Please let me know if I can take this up.
Thanks!