Skip to content

Commit

Permalink
fix: 🚧 try to fix json backup downloads on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
jojobyte committed Feb 10, 2024
1 parent a10e6f9 commit 64e9584
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/helpers/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,16 @@ export function saveJsonToFile(filename, dataObjToWrite) {
link.href = window.URL.createObjectURL(blob);
link.dataset.downloadurl = ["text/json", link.download, link.href].join(":");

const evt = new MouseEvent("click", {
view: window,
bubbles: true,
cancelable: true,
});
document.body.appendChild(link);

// const evt = new MouseEvent("click", {
// view: window,
// bubbles: true,
// cancelable: true,
// });

link.dispatchEvent(evt);
// link.dispatchEvent(evt);
link.click();
link.remove()
}

Expand Down

0 comments on commit 64e9584

Please sign in to comment.