What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 122 Stack Exchange communities.

Steps to reproduce:

  1. Go to a question
  2. Type an answer
  3. Delete contents of the answer
  4. Click on a link such as Unanswered

IE7/8: The error message will read null instead of the normal You have started writing or editing a post.

Firefox: Nothing happens and you are taken to the link without being prompted.

share|improve this question
add comment

4 Answers

up vote 10 down vote accepted

This is fixed in the next push.

I was returning null in the onbeforeunload handler instead of not returning anything, e.g.:

// incorrect behavior in IE
window.onbeforeunload = function() {
   return (hasUserEnteredText) ? "You've started writing a post!" : null;
}

// correct behavior everywhere!
window.onbeforeunload = function() {
   if (hasUserEnteredText)
      return "You've started writing a post!";
}
share|improve this answer
add comment

I'm not getting any message box at all when I do this (Firefox 3.5.3)

Confirmed: I am getting it in IE7...

share|improve this answer
    
Same here. No repro. –  Robert Cartaino Oct 13 '09 at 21:47
add comment

Appears to be IE specific.

share|improve this answer
7  
Surprise surprise. –  GManNickG Oct 13 '09 at 22:17
add comment

Confirmed: Windows XP in IE 7

share|improve this answer
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .