A very minor and rare bug, primarily sharing it here for other people that run into it.
We had a forum where the FAQ was not being marked as read for users. After a very, very, very long debug session it turned out to be because this specific FAQ ended with a link to another post on the forum.
That post got embedded, causing a <aside class="quote".... >
to be present in the /faq page, being the very last child within div.cooked
, so this never triggered.
isElementInViewport(document.querySelector(".contents p:last-child"))
The issue was solved by editing the FAQ and adding a .
on an empty line at the bottom.