Skip to content
Snippets Groups Projects
Commit 8873f67c authored by Anton Kuzmenko's avatar Anton Kuzmenko
Browse files

Issue #2679879 by zahord, snig, pmusaraj, kandrupaler, jmato, formatC'vt,...

Issue #2679879 by zahord, snig, pmusaraj, kandrupaler, jmato, formatC'vt, qzmenko: New comment is added to the wrong position when previous comment has reply
parent 28c8acb1
Branches
Tags
No related merge requests found
......@@ -82,7 +82,13 @@
*/
Drupal.ajax.prototype.commands.ajaxCommentsAfter = function(ajax, response, status) {
try {
$(response.html).insertAfter(response.selector);
var $element = $(response.selector);
var $nextElement = $($element).next();
if ($nextElement.hasClass('indented')) {
$element = $nextElement;
}
$(response.html).insertAfter($element);
// Attach all JavaScript behaviors to the new content, if it was successfully
// added to the page, this if statement allows #ajax['wrapper'] to be
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment