Skip to content

Warn about unsaved changes before switching notes #20

Closed

Description

@gnacho

Switching to another note (or creating a new one) silently discards pending edits. The editor resets its title and content when the active note changes, and there is no dirty tracking or warning anywhere.

Reproduced: type into a note, click another note, click back; the edit is gone.

Expected:

  • Track whether the editor has unsaved changes (title or content differ from the stored note)
  • Before switching notes or creating a new one with pending changes, show a dialog with Save / Discard / Cancel
  • Save persists and then continues; Discard continues without saving; Cancel stays on the current note
  • If the save fails, stay on the current note and surface the error
  • Warn on tab close (beforeunload) while there are unsaved changes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions