i'm using ie5.5 on windows at work and it seems to do it automagically. i suppose you could write a script to trap keystrokes and change the text field back to the last saved state.
Closed down a tab you needed in Safari? In the latest version, the same keyboard shortcut you'd use to undo an oopsie in any other program will bring it back. That's right—Command+Z (Control+Z on ...