cjard
Well-known member
- Joined
- Apr 25, 2006
- Messages
- 7,081
- Programming Experience
- 10+
On some other pages, like old Windows Update, if you tried to navigate away from the page a dialog would appear saying "Blah blah something bad will happen if you leave, are you sure you want to leave?"
I was thinking about this as I just accidentally lost a post i was making to give a lot of help to a guy - my touchpad went a bit nuts and zapped the mouse across screen as i was trying to click. I ended up clicking a banner ad and the page loaded. On this board in particular (i dont have this problem with other more primitive boards that dont have a richedit textbox to type posts into) i cant just press BACK and get back to the typing i just lost
A similar thing can happen if you transfer focus out of the text box and then press backspace or something...
However it may occur, if the user has done some typing, it would be nice to show an alert saying "If you navigate away from this page, the typing will be lost. OK CANCEL"
Anyone else ever lost a post in this way and wish they'd had this second-chance?
Additionally, to prevent accidental confirmation by key press e.g. pressing space just as the dialog is appearing, you could take note of the time the first dialog is shown, and start a loop whereby if the answer is given within 2 seconds, then says "answer was given too fast, maybe via accidental keypress.. wait 2 seconds then answer if you really want to nav away from the page"
Oops.. ive gone into implementation mode..
I was thinking about this as I just accidentally lost a post i was making to give a lot of help to a guy - my touchpad went a bit nuts and zapped the mouse across screen as i was trying to click. I ended up clicking a banner ad and the page loaded. On this board in particular (i dont have this problem with other more primitive boards that dont have a richedit textbox to type posts into) i cant just press BACK and get back to the typing i just lost
A similar thing can happen if you transfer focus out of the text box and then press backspace or something...
However it may occur, if the user has done some typing, it would be nice to show an alert saying "If you navigate away from this page, the typing will be lost. OK CANCEL"
Anyone else ever lost a post in this way and wish they'd had this second-chance?
Additionally, to prevent accidental confirmation by key press e.g. pressing space just as the dialog is appearing, you could take note of the time the first dialog is shown, and start a loop whereby if the answer is given within 2 seconds, then says "answer was given too fast, maybe via accidental keypress.. wait 2 seconds then answer if you really want to nav away from the page"
Oops.. ive gone into implementation mode..