fix(comments): let clicks through the thread hitbox when avatars are hidden - #4292
Merged
ImprovedTube2 merged 1 commit intoAug 20, 2026
Conversation
…hidden With `hide author avatars` on, the 36px avatar column collapses, but YouTube's `.thread-hitbox` is absolutely positioned at left:0 with that same width. It then sits over the start of the comment body and swallows clicks on the like button and, in longer comments, "read more". Disabling pointer events on it under that feature restores both. The hitbox only existed to make the avatar column clickable, and that column is gone once the feature is on. Resolves code-charity#4291 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Collaborator
|
Thank you! |
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.
Resolves #4291
What
With
appearance > comments > hide author avatarsenabled, the comment's like button and the "read more" expander stop responding to clicks.Hiding
#author-thumbnailcollapses the 36px avatar column, but YouTube's.thread-hitboxis a direct child ofytd-comment-thread-renderer, absolutely positioned atleft: 0withwidth: 36px. Once the column collapses, the comment body slides under it and the hitbox intercepts the clicks.The fix disables pointer events on that element under this feature only. The hitbox exists to make the avatar column clickable for the reply chain — that column is gone once the feature is on, so there is nothing left for it to cover.
How it was verified
Measured on a real YouTube watch page by injecting this repo's existing rule verbatim (
#author-thumbnail, #creator-thumbnail, #hearted-thumbnail { display: none !important }), then probingdocument.elementFromPoint()at the centre of the like button:div.ytSpecTouchFeedbackShapeFilldiv.thread-hitboxdiv.ytSpecTouchFeedbackShapeFilldiv.ytSpecTouchFeedbackShapeFillThe last row is the regression check: the rule is scoped to
html[it-hide-author-avatars='true'], so default behaviour is untouched.Geometry that explains it, from the same page:
#author-thumbnailisx=16 w=36,#mainstarts atx=68. With the avatars rule applied#mainmoves tox=16and the like button tox=8, while.thread-hitboxstays atx=16 w=36— directly over it.Notes
display: none) would be equivalent for clicks. If you'd rather keep the affordance, the alternative is re-positioning the hitbox instead of disabling it — happy to switch.Note
AI model used —
claude-opus-5, reasoning efforthigh. I read and verified every line before submitting.