Fix new comment discarding existing unsaved draft comments.

Review Request #9201 — Created Sept. 22, 2017 and submitted — Latest diff uploaded

Information

Review Board
release-3.0.x
9d1163e...

Reviewers

When a comment box was open, clicking a new line to add another comment would
discard the current comment without warning or prompting the user to save
changes. The old comment box was silently closed, and a new one was opened.

This change warns the user before the old comment box is closed. Pressing
cancel keeps the old comment box open. Pressing OK closes the old comment
box without saving it, and creates a new one.

Unit tests pass.

Manually tested clicking a new line to add a comment, when a current comment
box was open. Manually tested clicking a new line to add a comment, when a
previously saved comment box was open. Pressing OK continues to create a
new comment, discarding the unsaved comment. Pressing cancel returns to
the current open comment box.

    Loading...