Hey there Ben, Rod, Matt and friends!
I’ve had a few clients mistakenly close their browser tab/window while actively making changes (things like image ratings, editing requests, etc) to their client feedback pages. Upon re-opening the page, they find that all their input is gone. Although this is normal behavior, I would like to help them prevent it from happening.
Is there a suggested method for adding an event handler for beforeunload events (or something similar)? Some kind of notification that warns the user that they will lose any unsaved changes if they close the client feedback page before submitting their feedback?
Before reaching out to ask for your advice, I was looking for ideas at stackoverlow.com on how to implement something like this.
That approach seems pretty straightforward; but I thought you guys might be able to apply a little “Backlight Protocol” to my approach. Meaning I’m not going to be trying anything until I get your feedback first.