HTML Diff Report Height Bug?
Posted: Thu Oct 31, 2013 6:07 am
Hello!
I've been generating hundreds of javascript-enabled Diff Reports for work and I think I've happened upon a bug. It occurs when the height of the diff is taller than the window height. Say I have a file with 400 lines of code, and 4 diffs with length as follows:
Diff 1: 1 line
Diff 2: 5 lines
Diff 3: 100 lines
Diff 4: 2 lines
If I use the navigation buttons to jump to the next diff, I have no issues jumping between diffs 1 and 2, but when I jump to diff 3, the view returns to line 1 of my code! Looking at difftempl.html, line 191, I think the code should be : $('.file').scrollTop(block.position().top - tableMidpoint) rather than $('.file').scrollTop(midpoint - block.position().top), as var midpoint hasn't even been defined at that point.
Anyone else see this issue?
I've been generating hundreds of javascript-enabled Diff Reports for work and I think I've happened upon a bug. It occurs when the height of the diff is taller than the window height. Say I have a file with 400 lines of code, and 4 diffs with length as follows:
Diff 1: 1 line
Diff 2: 5 lines
Diff 3: 100 lines
Diff 4: 2 lines
If I use the navigation buttons to jump to the next diff, I have no issues jumping between diffs 1 and 2, but when I jump to diff 3, the view returns to line 1 of my code! Looking at difftempl.html, line 191, I think the code should be : $('.file').scrollTop(block.position().top - tableMidpoint) rather than $('.file').scrollTop(midpoint - block.position().top), as var midpoint hasn't even been defined at that point.
Anyone else see this issue?