# HG changeset patch # User Jan Heylen # Date 1432916303 -7200 # Node ID 9c067ee8d368b7890f3cababc9bdfbf31ab8bfe7 # Parent 83e0a4ce1c075443fe17d9fd96aeaecaaba5fe97 changeset comment: fix delete button issue issue: when deleting comments in a list of comments on the same line, sometimes the add new comment button stops working root cause: when deleting a comment in a list of comments that are all on the same line, the wrong previous tr is chosen, the chosen tr could be an inline comments instead of a line tr, resulting in the fact that injectinlineform function will return immediatly solution: loop over the found tr until its no longer an inline comment remark: could probably be optimised futher to immediatly search for the line tr object diff -r 83e0a4ce1c07 -r 9c067ee8d368 kallithea/public/js/base.js --- a/kallithea/public/js/base.js Sun May 31 13:56:27 2015 +0200 +++ b/kallithea/public/js/base.js Fri May 29 18:18:23 2015 +0200 @@ -736,6 +736,9 @@ var success = function(o){ var $deleted = $('#comment-tr-'+comment_id); var $prev = $deleted.prev('tr'); + while ($prev.hasClass('inline-comments')){ + $prev = $prev.prev('tr'); + } $deleted.remove(); _placeAddButton($prev); }