diff options
author | Byron Jones <glob@mozilla.com> | 2015-02-03 05:55:51 +0100 |
---|---|---|
committer | Byron Jones <glob@mozilla.com> | 2015-02-03 05:55:51 +0100 |
commit | a62031f009525769d52476350cee0facd91736b6 (patch) | |
tree | 35cd8656217c4e766c4e97d9fe3d395a2a2745db /extensions/InlineHistory | |
parent | 54f968d628c0cf6de505e82be06f964253ca12b7 (diff) | |
download | bugzilla-a62031f009525769d52476350cee0facd91736b6.tar.gz bugzilla-a62031f009525769d52476350cee0facd91736b6.tar.xz |
Bug 1088082: Can't see non-comment changes after comment #0 until comment #1 appears if using description + newest to oldest comment sorting
Diffstat (limited to 'extensions/InlineHistory')
-rw-r--r-- | extensions/InlineHistory/web/inline-history.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/extensions/InlineHistory/web/inline-history.js b/extensions/InlineHistory/web/inline-history.js index a1bfeca23..4c4452d6a 100644 --- a/extensions/InlineHistory/web/inline-history.js +++ b/extensions/InlineHistory/web/inline-history.js @@ -95,7 +95,7 @@ var inline_history = { var time = item[1]; var reachedEnd = false; - var start_index = ih_activity_sort_order == 'newest_to_oldest_desc_first' ? 1 : 0; + var start_index = (ih_activity_sort_order == 'newest_to_oldest_desc_first' && commentTimes.length > 1) ? 1 : 0; for (var j = start_index, jl = commentTimes.length; j < jl; j++) { var commentHead = commentTimes[j].parentNode; var mainUser = Dom.getElementsByClassName('email', 'a', commentHead)[0].href.substr(7); @@ -137,7 +137,11 @@ var inline_history = { if (previous && previous.className.indexOf("ih_history") >= 0) { currentDiv = this.previousElementSibling(parentDiv); } else { - parentDiv.parentNode.insertBefore(currentDiv, parentDiv); + if (commentTimes.length == 1) { + parentDiv.parentNode.insertBefore(currentDiv, parentDiv.nextSibling); + } else { + parentDiv.parentNode.insertBefore(currentDiv, parentDiv); + } } } else { var parentDiv = commentHead.parentNode; |