Fix keyboard navigation regressions in the diff viewer.

Review Request #9112 — Created July 31, 2017 and submitted — Latest diff uploaded

Information

Review Board
release-2.5.x
fdf4496...

Reviewers

A recent change improved performance in the diff viewer by optimizing
selectors. One of the selectors optimized was the one used to find
anchors in a diff. Unfortunately, it only looked in <tbody> tags, and
not in <thead>, skipping the file anchors. This prevented these
anchors from navigating to file headers, and for review requests
containing newly-introduced files, it wasn't possible to navigate to the
diffs.

This change fixes the selector and adds a new suite of tests to ensure
that anchor loading, navigation, and key bindings all work correctly.

Tested manually that diff navigation worked for all diffs I threw at it.

Unit tests pass.

    Loading...