sderacy / gooncard

The Goon Squad's Goon Card Project for CSC 355 ('22)
http://gooncard.hpc.tcnj.edu:3000/
MIT License
6 stars 2 forks source link

Warn users before they navigate to another page if they've made changes #137

Closed sderacy closed 2 years ago

sderacy commented 2 years ago

Currently, if the user clicks to another page from profile or settings, it will actually just let them do so and lose all their changes. It should give them a choice to confirm this so that they don't lose any data accidentally.

paytonshaltis commented 2 years ago

Will probably want to look at the beforeUnload() event handler.

sderacy commented 2 years ago

I was literally gonna say the same thing: https://stackoverflow.com/questions/1119289/how-to-show-the-are-you-sure-you-want-to-navigate-away-from-this-page-when-ch