mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
fix comment preview and scroll to the just created comment after posting it
This commit is contained in:
2
boot.php
2
boot.php
@@ -70,7 +70,7 @@ require_once('include/security.php');
|
||||
|
||||
|
||||
define('PLATFORM_NAME', 'hubzilla');
|
||||
define('STD_VERSION', '10.5.1');
|
||||
define('STD_VERSION', '10.5.2');
|
||||
define('ZOT_REVISION', '6.0');
|
||||
|
||||
define('DB_UPDATE_VERSION', 1263);
|
||||
|
||||
@@ -1790,6 +1790,7 @@ function doreply(parent, ident, owner, hint) {
|
||||
|
||||
modal_content.innerHTML = '';
|
||||
modal_content.append(form);
|
||||
modal_content.append(preview);
|
||||
|
||||
// Set the value of the input named 'parent'
|
||||
const parentInput = form.querySelector('input[name=parent]');
|
||||
@@ -1830,6 +1831,7 @@ function doreply(parent, ident, owner, hint) {
|
||||
modal_container.addEventListener('hide.bs.modal', event => {
|
||||
// move form back to where it was
|
||||
form_container.append(form);
|
||||
form_container.append(preview);
|
||||
});
|
||||
|
||||
// Set the textarea value
|
||||
@@ -2071,6 +2073,10 @@ function post_comment(id) {
|
||||
$("#comment-edit-text-" + id).val('').blur().attr('placeholder', aStr.comment);
|
||||
$('#wall-item-sub-thread-wrapper-' + data.thr_parent_id).append(data.html);
|
||||
|
||||
const comment = document.getElementById('wall-item-content-wrapper-' + data.id);
|
||||
comment.classList.add('item-highlight-fade');
|
||||
comment.scrollIntoView();
|
||||
|
||||
updateRelativeTime('.autotime');
|
||||
$('body').css('cursor', 'unset');
|
||||
collapseHeight();
|
||||
|
||||
Reference in New Issue
Block a user