Repository navigation
Fix the diffstat line count hover in the commit details - #773
Merged
Merged
Conversation
Make hovering the changed-lines count of a file reveal the +/- details again and hide them when the pointer leaves. - Iterate over the element children by index; the for-in loop also visited non-element properties and threw a TypeError on every hover. - Add the "hidden" class when collapsing; it was removed instead, so the details never hid again.
goneng
marked this pull request as ready for review
October 24, 2026 18:03
hannesa2
approved these changes
Oct 24, 2026
hannesa2
left a comment
Contributor
There was a problem hiding this comment.
Style: Consistent with the rest of the file (uses var throughout, no let/const/for...of), no over-engineering.
No objections. The fix is minimal, targeted, and easy to follow based on the markup—I would merge this as is.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make hovering the changed-lines count of a file in the commit details reveal the
+/-details again,and hide them when the pointer leaves.
Details
threw
TypeError: undefined is not an object (evaluating 'c.classList.contains')on every hover.hiddenclass when collapsing; it was removed instead, so the details never hid again.Both regressions date from 4820fdc (CSP change), which replaced
style.displaywiththe
hiddenclass and copied the expand body into the collapse function.Screenshots
Regular Mode - Graph Lines Added/Removed
Hover Mode - Count Lines Added/Removed
Test plan
the
+N/-Mdetails appear with no error in the web view console, and disappearwhen the pointer leaves.
hidden, collapse sets it.