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

Firefox Cannot Save or Load Files #388

Closed
RyanR712 opened this issue Apr 27, 2024 · 2 comments · Fixed by #390
Closed

Firefox Cannot Save or Load Files #388

RyanR712 opened this issue Apr 27, 2024 · 2 comments · Fixed by #390
Assignees
Labels
Bug Something isn't working. Rightmost number in semantic versioning help wanted Extra attention is needed

Comments

@RyanR712
Copy link
Collaborator

Describe the bug
Neither CTRL+S or clicking the save button on Firefox download files. There is no difference in behavior between Draw Mode and Proof Mode downloads.

CTRL+S will attempt to download the .webp file and clicking the save file button will bring up a 404 error.

To Reproduce
Access PMH via Firefox. Then,

Create some drawing or some proof and attempt to save it through CTRL+S or clicking the save button.

In the former case, you will download a .webp file instead.

In the latter case, you will get redirected to a 404 error.

Expected behavior
CTRL+S and clicking the save button should prompt the user to download a .json file to their downloads folder.

Screenshots Or Video
Improper CTRL+S behavior.
image

Improper save button behavior.
image

@RyanR712 RyanR712 added the Bug Something isn't working. Rightmost number in semantic versioning label Apr 27, 2024
@James-Oswald James-Oswald added the help wanted Extra attention is needed label Apr 27, 2024
@James-Oswald
Copy link
Member

Cause: Firefox does not have "showSaveFilePicker" https://developer.mozilla.org/en-US/docs/Web/API/Window/showSaveFilePicker
image
This triggers quick download code, which behaves differently on Firefox, as clicking a link opens a new tab rather than starting a download.

const f = document.createElement("a");
f.href = aegStringify(data);
f.download = name + ".json";
f.click();

@James-Oswald James-Oswald changed the title Firefox Cannot Save Files Firefox Cannot Save or Load Files May 5, 2024
@James-Oswald
Copy link
Member

Bug also applies to loading files

@James-Oswald James-Oswald self-assigned this May 5, 2024
@James-Oswald James-Oswald linked a pull request May 5, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working. Rightmost number in semantic versioning help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants