Replaced hasUnsavedData with beforeunload method.
Authored by: keess 2016-04-08
Parent: [r2880]
Child: [r2882]