Browser 'Back' button - can it be monitored as well?

ramper - December 5, 2008 - 21:35
Project:Node Edit Protection
Version:6.x-1.0
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi, this is a great little module - anything that will make someone switching from a regular 'word processing' background feel more at ease is great. Of course, a web browser is not the same as a word processor...
Knowing nothing about how browsers work, I was wondering - is it possible to monitor clicking on the browser 'Back' or 'Forward' button as well? This module gives a warning when you click on a link - but a lot of times people simply navigate away using the 'Back' button. Thanks for this great module!

#1

febbraro - December 8, 2008 - 15:39

I am listening to the window unload event. It gets fired when using the back button, but it appears to get called too late in the process to actually prevent the back action from happening. So, it seems they get a warning, but it does not stop them. I'll have to investigate a bit further, but the back button is obviously a big one and difficult one to get around.

#2

ramper - December 10, 2008 - 17:42

I see, thanks. This is a useful module for those moving from a regular word processing background.

#3

deverman - October 13, 2009 - 07:41

Any progress on this module we have users losing their work regularly.

#4

ircdirk - October 18, 2009 - 12:09

Yes its possible i made my own version of node-edit-protection.js It does work for back buttons and jquery using window.onbeforeunload. Please check it out. Its simple and it works ;)

AttachmentSize
node-edit-protection.zip 469 bytes
 
 

Drupal is a registered trademark of Dries Buytaert.