title: onBeforeUnload handler says null in IE
body: <p>my web-app has this:</p>
  
  <pre><code>$(window).bind('beforeunload', function() {
      if(unSavedChanges == true)
      {
          return 'You have unsaved changes';
      }
      return null;
  });
  </code></pre>
  
  <p>this works fine in Safari and Firefox (with the exception that firefox does not show my custom message in it's onBeforeUnload dialog). However on IE 8 on Windows 7, it always shows the onBeforeUnload notification, specifically if there are no unsaved changes, it would just say "null". How can I prevent IE from showing onBeforeUnload notification when user has saved everything and wants to navigate away?</p>
  
  <p>as per Jon's suggestion, I have removed the <code>return null</code> line, the code now reads</p>
  
  <pre><code>$(window).bind('beforeunload', function() {
     if(unSavedChanges == true)
     {
         return 'You have unsaved changes';
     }
  });
  </code></pre>