Alert the user when leaving the page while editing text.

Review Request #2437 — Created June 28, 2011 and submitted — Latest diff uploaded

Information

Review Board

Reviewers

Alert the user when leaving the page while editing text.

We were alerting the user when navigating away if a comment dialog was open
and being edited, but many users were wanting this for other fields too.

So now we alert the user if any text field is being edited, if the review
form is up, or if a comment dialog is dirty.
Tested various fields on the review request, in comment dialogs, and in the review form.

Whenever something was open/dirty, and I tried to navigate away, I got an alert.

I never got alerts after canceling/saving things and then navigating away.