Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Meta

Post History

#1: Initial revision by user avatar clemens‭ · 2026-04-02T01:57:29Z (6 months ago)
I found that the problem is with the event-listener code in line 73 of https://math.codidact.com/assets/application-ba1f9d37b09ac57d363a53b8936f4b70438bff1fbe2ae8408013ec99fc833225.js . The event-listener sets the "i" object, whose "data-thread" attribute yields the comment thread number, as the target of the "click" event. This works when one clicks on normal text (because the immediately enclosing element is then an a.js--comment-link element) but does not work when one clicks on math (because the immediately enclosing element is then an mjx-container or similar element). Hence the [previous bug-report](https://meta.codidact.com/posts/295715) appears incorrect when it says that refreshing the page fixed the problem: in fact, the issue is still present if you click on the MathJax $+1$, but when you click elsewhere the comment expands correctly (so, probably, the user clicked on the $+1$ the first time around and then clicked elsewhere the next time). You can confirm that this is the root of the problem by using the inspector to edit (say, italicize) a part of the text in a comment title and then clicking on the italicized part; it will give a 404 error.) 

(Hence, to fix the problem, change the code
```
async e => {
  if (e.ctrlKey || e.metaKey) return;
  e.preventDefault();
  const i = $(e.target),
    a = i.data("thread");
  t(n(i), a)
}
```

 to something like 

```
async e => {
  if (e.ctrlKey || e.metaKey) return;
  e.preventDefault();
  const i = $(e.target);
  while (!i.classNames.contains("js--comment-link")) i=i.parentElement;
    a = i.data("thread");
  t(n(i), a)
}
```

I don't know what code this corresponds to in the non-minified JS, though.)