fix
This commit is contained in:
parent
fbdb0319c9
commit
f492012494
2 changed files with 3 additions and 2 deletions
|
@ -5,7 +5,6 @@ function timestamp(str, ti) {
|
|||
|
||||
function collapse_comment(comment_id) {
|
||||
const comment = document.getElementById(`comment-${comment_id}`)
|
||||
const isClosed = comment.classList.contains("collapsed");
|
||||
const top = comment.getBoundingClientRect().y;
|
||||
|
||||
const toggler = document.getElementById(`comment-collapse-${comment_id}`);
|
||||
|
@ -14,6 +13,8 @@ function collapse_comment(comment_id) {
|
|||
|
||||
['items-center', 'opacity-50', 'hover:opacity-100', 'collapsed'].map(y=> comment.classList.toggle(y)); // apply flex alignment and opacity to comment parent wrapping div
|
||||
|
||||
const isClosed = comment.classList.contains("collapsed");
|
||||
|
||||
document.getElementById(`comment-toggle-icon-${comment_id}`).innerText = isClosed ? '[+]' : '[-]';
|
||||
|
||||
if (isClosed && top < 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue