Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prompting the user before exiting with unsaved changes #38

Closed
alfongj opened this issue Aug 2, 2011 · 2 comments
Closed

Prompting the user before exiting with unsaved changes #38

alfongj opened this issue Aug 2, 2011 · 2 comments
Assignees

Comments

@alfongj
Copy link
Owner

alfongj commented Aug 2, 2011

If there are unsaved changes, we should prompt the user if he wants to save them, when he clicks to close the browser window.

If it is possible to communicate back which flash in that moment, this could be useful for detecting when the user closed the window on purpose (therefore, eliminating the autosave copy) and when it was closed without user interaction (therefore conersving the copy).

@alfongj
Copy link
Owner Author

alfongj commented Aug 2, 2011

This tutorial can be useful

@ghost ghost assigned alfongj Aug 8, 2011
@alfongj alfongj closed this as completed in 12a099e Aug 8, 2011
@alfongj
Copy link
Owner Author

alfongj commented Aug 8, 2011

Done using a function inside builder.jsp which runs at the onbeforeunload (when the browser window is closed) event, which calls FileManager.askBeforeExit(). This function eliminates auto-saved trees, and tells the javascript calling function that it should prompt the user if he wants to continue in the web, if there are unsaved changes in the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant