Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn when cards have unsaved changes #169

Open
iopq opened this issue Sep 24, 2022 · 3 comments
Open

Warn when cards have unsaved changes #169

iopq opened this issue Sep 24, 2022 · 3 comments

Comments

@iopq
Copy link

iopq commented Sep 24, 2022

I have lost cards because I forgot to click "Save" since I immediately try to learn the cards after I enter them. Sometimes the very last card just gets lost because I didn't save it, and it's not obvious this happened since it's just not there

There's a way to prompt on unsaved changes, I'd like this to happen when cards are not saved

@iopq
Copy link
Author

iopq commented Sep 25, 2022

To clarify: I want to add a beforeunload event listener when any card has been changed without being saved

@lakesare
Copy link
Owner

lakesare commented Oct 2, 2022

I agree we should add it.

beforeunload should save the html of the card in localStorage;
and, when this course is reopened, we should offer the Restore the flashcard; Dismiss the flashcard buttons.

The PR is welcome!

@lakesare
Copy link
Owner

Price assignment (re: memcode#requesting-a-feature)

Cache unsaved flashcard: $20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants