If there are unsaved changes when the user navigates away from the page, there should be a modal popup to say that there are unsaved changes.
To ensure the user does not accidentally navigate away with unsaved changes Trello link