Prevent anchor conflicts when linking to comments in reviews.

Review Request #9141 — Created Aug. 16, 2017 and submitted

Information

Review Board
release-3.0.x
00cc438...

Reviewers

Linking to comments in reviews didn't work correctly in all browsers. We
had anchors in place right before the comment's context that URLs should
have been able to link to, but the actual comment text had IDs that were
the same as the anchor names, causing the page to scroll past the
content and to the text itself. This appears to have been done in order
to add highlighting of the linked comment, making use of the :target
CSS rule, but didn't produce ideal results.

We now define those IDs on the main container for the comment. This
ensures that the right place is linked to, and we get the highlighting
capability for free.

This also adds highlighting for replies to comments. This didn't work
at all before, but comment replies now have the IDs and styles necessary
for it.

Tested linking to top-level comments and replies for every type of comment.
Verified they were highlighted and jumped to the right place.

david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (3bb279e)
Loading...