fix
This commit is contained in:
parent
43b16d5928
commit
7f2cf3a43b
2 changed files with 3 additions and 3 deletions
|
@ -11,13 +11,13 @@ function collapse_comment(comment_id) {
|
||||||
|
|
||||||
|
|
||||||
const isClosed = comment.classList.contains("collapsed");
|
const isClosed = comment.classList.contains("collapsed");
|
||||||
|
|
||||||
const top = comment.getBoundingClientRect().y;
|
const top = comment.getBoundingClientRect().y;
|
||||||
|
|
||||||
const arr = [text, actions, repliesOf];
|
const arr = [text, actions, repliesOf];
|
||||||
|
|
||||||
arr.map(x => x.classList.toggle('hidden')); // hide comment elements
|
arr.map(x => x.classList.toggle('hidden')); // hide comment elements
|
||||||
comment.classList.toggle('items-center opacity-50'); // apply flex alignment and opacity to comment parent wrapping div
|
['items-center', 'opacity-50'].map(y=> comment.classList.toggle(y)); // apply flex alignment and opacity to comment parent wrapping div
|
||||||
|
|
||||||
if (isClosed && top < 0) {
|
if (isClosed && top < 0) {
|
||||||
comment.scrollIntoView()
|
comment.scrollIntoView()
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<script defer src="/assets/js/popover.js?v=16"></script>
|
<script defer src="/assets/js/popover.js?v=16"></script>
|
||||||
<script defer src="/assets/js/comments.js?v=10"></script>
|
<script defer src="/assets/js/comments.js?v=12"></script>
|
||||||
|
|
||||||
{% include "expanded_image_modal.html" %}
|
{% include "expanded_image_modal.html" %}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue