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

Navigating between projects can cause overwriting #623

Open
hallpell opened this issue Jan 24, 2024 · 0 comments
Open

Navigating between projects can cause overwriting #623

hallpell opened this issue Jan 24, 2024 · 0 comments

Comments

@hallpell
Copy link
Collaborator

This is a bug that will sometimes cause students to overwrite work, which is recoverable but in an unintuitive way.

Steps to reproduce:

  1. Save a project
  2. Modify and don't save it (so it is in a dirty state)
  3. Attempt to navigate to another project using the navigation menu in the top left
  4. Hit cancel on the "Reload Page? Changes you made may not be saved" prompt
  5. Hit save. This will overwrite the project you were trying to navigate to with the current version of the project you are leaving.

This is happening because attempting to navigate to a new project will always change the hash, and hitting cancel on the prompt doesn't undo that. So when you hit save (which is a natural response in the above workflow), it saves in the destination project, even though we still have the old code.

My initial investigations into this led me to onbeforeunload, which seems like it should be controlling what we're interested in...

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

1 participant