Board Thread:General Discussion/@comment-1274766-20140222161641

Hi,

I suggest to add a confirmation dialog when the user closes a page where they have previewed a page or a comment on a wall. This would prevent the user to lose its content because they have forgotten to publish. The code is easy. Here it is:  
 * First, create a JavaScript variable set to false on the JavaScript code of the page.
 * Set the variable to true when the user has started to write something.
 * Then, you have to code the following function that will prompt a warning message when there are unsaved modifications.