forked from MarseyWorld/MarseyWorld
When replying to a comment now it autofocus the input
parent
f2081b7594
commit
b934f52d19
|
@ -275,7 +275,7 @@
|
|||
aria-hidden="true"></i><span class="d-none d-md-inline-block">Give Award</span></a></li>
|
||||
{% endif %}
|
||||
|
||||
<li class="list-inline-item text-muted"><a href="javascript:void(0)" onclick="document.getElementById('reply-to-{{c.id}}').classList.remove('d-none')"><i class="fas fa-reply" aria-hidden="true"></i><span class="d-none d-md-inline-block">Reply</span></a></li>
|
||||
<li class="list-inline-item text-muted"><a href="javascript:void(0)" onclick="openReplyBox('{{c.id}}')"><i class="fas fa-reply" aria-hidden="true"></i><span class="d-none d-md-inline-block">Reply</span></a></li>
|
||||
{% endif %}
|
||||
|
||||
<li class="list-inline-item text-muted d-none d-md-inline-block"><a {% if v %}href="{{c.permalink}}?context=5#context"{% else %}href="/logged_out{{c.permalink}}?context=5#context"{% endif %}><i class="fas fa-book-open"></i>Context</a></li>
|
||||
|
|
|
@ -105,6 +105,15 @@
|
|||
|
||||
});
|
||||
|
||||
// Open comment reply box
|
||||
|
||||
function openReplyBox(id) {
|
||||
const element = document.getElementById(`reply-to-${id}`);
|
||||
element.classList.remove('d-none')
|
||||
|
||||
element.getElementsByTagName('textarea')[0].focus()
|
||||
}
|
||||
|
||||
// Comment edit form
|
||||
|
||||
toggleEdit=function(id){
|
||||
|
|
Loading…
Reference in New Issue