I’ve seen a few cases where a long detailed comment was being written on a task and the page was accidentally navigated away from, losing the comment that had not yet been finished/saved. It would be great to have a confirmation before leaving a page when there is unsaved data (possibly via onbeforeunload?).
I strongly support the idea of having a confirmation prompt before leaving a page with unsaved data. This is a crucial feature, particularly for a to-do list application. It can easily happen that a user isn’t aware something hasn’t been saved, especially when they’re in the flow of adding multiple tasks.
For instance, if someone thinks they’ve added a to-do item, but it wasn’t actually saved, it can lead to missed tasks or deadlines. This is especially problematic because the assumption is that the task was recorded, and the user has likely already moved on to thinking about the next thing.
A simple confirmation before navigating away with unsaved changes could prevent these kinds of “errors” and provide peace of mind. Another approach to tackle this issue could be implementing an auto-save feature, as seen in other tools like Microsoft Planner or Trello.