Reproduction instructions:
- Create a revision with long.txt, which has about 100 lines.
- Add an inline comment near the end of the file, saving and then submitting it.
- Delete about half the file locally, so the new file is shorter than the original file was.
- Update the revision.
- Reload the page so you see the most up-to-date version, then reply to the comment (which is now a ghost). Save the reply, but do not submit it yet.
- Try to edit the reply (which is still a draft).
Expected behavior:
- Editing (and deleting) work properly.
Actual behavior:
- The JS gets tripped up because the reply is placed "on line 100", but the file now only has about 50 lines. Javascript console spews some noise and the click is ignored.
Workaround:
- Reload the page first, then edit the inline comment.
Screenshot:
This is related to the issue discussed in T10563#164374.