Gui 997 UX Review for the "navigate away" issue on the detail page while changes are unsaved.


The feature has been implemented on the image, instance, scaling group, volume, snapshot and security group detail pages, and those pages are ready for UX review.

The behaviors include:
   When there exists input on the tag editor, which has been added, the page will display a warning message if user tries to click away from the page or click the submit button.
   When there exist unsaved changes on the detail page, such as name or tag update, the page will display a warning message if user tries to click away from the page.

The feature has been tested on Chrome, Firefox, and Safari on OS X. One noticeable issue is that Firefox wouldn't display the specified warning message, rather only display the genetic, default message.

Firefox doesn't appear to support window.onbeforeunload, so we should use window.onunload instead.  See https://developer.mozilla.org/en-US/docs/Web/API/Window.onunload