Skip to content

Save draft content locally when authoring posts or comments #525

@kadamwhite

Description

@kadamwhite

Issue Description

We should store post and comment content in localStorage while composing posts or responses, so that a browser crash, navigation mistake, or other issue does not cause drafted content to be lost.

This issue is split from #459 which made it more obvious when work would be lost, but provides no recovery option.

Steps to reproduce:

Sign into a H2 eg https://updates.hmn.md/, write a comment on a P2 post, click on the post name of a different post. You will be taken to the individual post page. Click back to go back to where you were, click on "reply" button.
Alternatively, begin to compose a post, then navigate to a different site. Return to H2 and click the new post button again.

Expected Result: Your draft content is still present in the text field. Possibly it highlights that it is an autosaved version of the comment.

Actual result: The field is empty and your content has gone forever into the great Cloud.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions