Closed RyanR712 closed 3 months ago
Cause: Firefox does not have "showSaveFilePicker" https://developer.mozilla.org/en-US/docs/Web/API/Window/showSaveFilePicker
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();
Bug also applies to loading files
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](https://github.com/RAIRLab/Peirce-My-Heart/assets/101666694/796d1268-db04-4a9b-b420-2718b5bf6e96)
Improper save button behavior.![image](https://github.com/RAIRLab/Peirce-My-Heart/assets/101666694/5ba50636-a57f-4cd6-ada2-b2392e94a882)