2lmc spool


loveable alpha grumps


Brainfart.


blech:

Brainfart.


posted on 2003/05/22 13:47

 

Browsers with an open text area with modified text should not let you close the window without warning.


 

Actually, make that any changed form field.


 

Shouldn't be too hard to detect, surely?


 

Heck, you could probably mock it up in Javascript, but it'd be better in the browser core itself.


jerakeen:

If it was possible to stop the window closing using Javascript, pop-up ads would be soooo much more annoying. So no, I doubt you can/ You could probably at least save the contents in a cookie or something, though.


blech:

Yes, I did think of that. However, you should be able to detect that any form element has changed with Javascript, and pop up a warning.


 

Given that, it's evident Javascript can know that there's unsaved state, and if it can, the browser core sure as hell should be able to.


 

So it'd be a partial mockup, but still possibly worthwhile.


 

Or did you mean that a Javascript state change could abusively trigger the 'do you want to close the changed window'? Possibly, but it should be possible for the browser core to distinguish JS and user changes.


 

The idea of keeping track of the textarea state locally on each change is interesting too. An extension of Form Autofill, so you can optionally recover state after a crash, might solve the problem from a different direction.


-trackback-

eggwhite / web browser features:



DISCLAIMER

We hate you all. Yes, especially you. Sod off and DIE