Skip to content

[Feature]: Warn before leaving unsaved Cloud file edits #261

Description

@DenizAltunkapan

Problem

When editing a file in Cloud, users can leave the editor even after changing the content. This can happen by closing the editor, navigating to another folder, opening another file, or leaving the page. If the user forgot to save, the changes are lost without a confirmation step.

Example scenario:

  • A user opens a Markdown file in Cloud.
  • They change the content but do not click save.
  • They navigate away from the editor.
  • The modified content is discarded without asking for confirmation.

Proposed solution

Track the original file content and compare it with the current editor content. If the editor is dirty, show a confirmation dialog before allowing the user to leave or close the editor.

Suggested confirmation copy:

Exit without saving? Your changes will be lost.

This should apply to relevant editor exit paths, including closing the editor, opening another file, navigating to another folder, and browser/tab navigation where feasible.

Acceptance criteria

  • The Cloud file editor tracks whether the current content has unsaved changes.
  • Closing the editor with unsaved changes shows a confirmation dialog.
  • Navigating away from the edited file with unsaved changes requires confirmation.
  • Saving the file resets the dirty state.
  • Leaving an unchanged file does not show the confirmation dialog.
  • Browser/tab close or refresh is guarded with a native unsaved-changes warning where supported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfrontendregarding frontend logic & design

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions