Skip to content

fix(ui): Traverse left-to-right also when finding line number in cell

Warren Gifford requested to merge mihir/diff-line-number-hover-bug into main

Created by: plibither8

With this PR, the search for the cell containing the line-number also traverses left-to-right through the elements, relative to the hovered cell. The crash-causing bug happened when the cursor would hover over the left-most cells, to the left of the "add"/"green" lines. Since the original traversal was only right-to-left, no line number would be found to the left of the hovered cells, which would invoke the error.

Google Chrome 2022-06-09 at 23 26 33 000089@2x

Closes #36253 (closed)

Test plan

  • Click this diff view and hover over the green area marked by the rectangle in the above image
  • No crash this time

App preview:

Check out the client app preview documentation to learn more.

Merge request reports

Loading