I\'m building a fail safe for my form that is going to warn users that if they leave the page their form data will be lost (similar to what gmail does).
If the user mouse is on a link and they trigger refresh page with the keyboard or activate a link with the keyboard, the prompt won't show up. So Dr.Molle approach will not work in this rare case.