Once the user made some changes on the Configurations tab, the "save configuration" link starts blinking. But the user can still leave the page without saving unintentionally.
Additionally to the blinking link, we can add an alert box in page leave to warn the user directly like many webpages do it for unsaved form data.
Example JS code:
window.addEventListener("beforeunload", function(event) {
// Cancel the event.
event.preventDefault();
// Chrome requires returnValue to be set.
// https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event#Examples
event.returnValue = '';
}
Should only be executed when there is an actual change.
Once the user made some changes on the Configurations tab, the "save configuration" link starts blinking. But the user can still leave the page without saving unintentionally.
Additionally to the blinking link, we can add an alert box in page leave to warn the user directly like many webpages do it for unsaved form data.
Example JS code:
Should only be executed when there is an actual change.