Skip to content

Editor fires an autosave immediately on open #491

Description

@dubadub

Found during review of #456. Pre-existing on main.

Opening /edit/<recipe> shows "Saved" in the header with no edits made, meaning the autosave PUT runs on load (templates/edit.html, the onChange wiring near the editor initialisation). This rewrites the file's mtime on every open, which also affects the index's modified-date sort.

Fix: only schedule autosave when the content differs from originalContent, and do not treat the initial editor population as a change.

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