fix
This commit is contained in:
parent
2e33144e81
commit
9966f6d10a
2 changed files with 9 additions and 1 deletions
|
@ -9,6 +9,14 @@ function collapse_comment(comment_id) {
|
|||
const closed = element.classList.toggle("collapsed")
|
||||
const top = element.getBoundingClientRect().y
|
||||
|
||||
const text = document.getElementById('comment-text-'+comment_id)
|
||||
const actions = document.getElementById('comment-actions-'+comment_id)
|
||||
const repliesOf = document.getElementById('replies-of-'+comment_id)
|
||||
|
||||
const arr = [text, actions, repliesOf];
|
||||
|
||||
arr.map(x => x.classList.toggle('hidden'));
|
||||
|
||||
if (closed && top < 0) {
|
||||
element.scrollIntoView()
|
||||
window.scrollBy(0, - 100)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue