jointakahe / takahe

An ActivityPub/Fediverse server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"SHOW" on CW in web interface not expanding post

futzle opened this issue · comments

A reader of fedi.vision (Takahe 0.10) noticed this small issue with expanding CWs in the web view interface.

Example page: https://fedi.vision/@vote@fedi.vision/replies/

  1. Go to above page. (Firefox but also reported on other browsers.)
  2. Find a post with a CW.
  3. Click on SHOW.

Expected result: Post is expanded.

Actual result: no change is visible on the web page; it remains collapsed.

Here's what is happening in the Javascript console:

Document.querySelectorAll: '.summary-{self.id} .summary' is not a valid selector [hyperscript.min.2e9b5242ff02.js:1:51625](https://fedi.vision/static/js/hyperscript.min.2e9b5242ff02.js)
hypertrace /// [hyperscript.min.2e9b5242ff02.js:1:21927](https://fedi.vision/static/js/hyperscript.min.2e9b5242ff02.js)
  -> on click or keyup   - 
<div class="summary" _="on click or keyup[key is…d} .content/> then halt" tabindex="0">

The target <div> itself has this class:

<div class="post  summary-{self.id}" data-takahe-id="317611159932175328" role="article" tabindex="0">
...
</div>

Is {self.id} meant to have been substituted with something during rendering of the HTML page? All the CW'd posts on the page have the same class.

The post itself federates to other servers fine, and it views fine in mobile clients. This is just a problem with the web view.

Suspect this line here:

return "summary-{self.id}"

Confirming that #716 applied manually to my instance fixes the problem. Thanks!