title: onbeforeunload custom dialog message not working
body: <p>i have a scenario where i need to show a dialog box asking user to recheck the changes that they have made </p>
  
  <p>so for that i am doing onbeforeunload and want to get a message saying "Please recheck the rating and feedback that you have provided"</p>
  
  <pre><code>$window.onbeforeunload = function() {
          var dialogText = 'Please recheck the rating and feedback that you have provided';
          return dialogText;
      };
  </code></pre>
  
  <p>But this end up showing "Changes you made may not be saved"(default message).</p>
  
  <p>I dont understand why i am getting as such </p>
  
  <p>Any help is appreciated.</p>