mirror of
https://github.com/marcrobledo/RomPatcher.js.git
synced 2025-06-27 16:25:54 +00:00
fix: safari is now ignored in setFakeFile
This commit is contained in:
parent
5e248e2565
commit
abb4a3ab8a
1 changed files with 2 additions and 1 deletions
|
@ -318,7 +318,8 @@ var RomPatcherWeb = (function () {
|
|||
return fallback || 0;
|
||||
},
|
||||
setFakeFile: function (id, fileName) {
|
||||
if (document.getElementById('rom-patcher-input-file-' + id)) {
|
||||
const isBrowserSafari = /Safari/i.test(navigator.userAgent); /* safari does not show fake file name: https://pqina.nl/blog/set-value-to-file-input/#but-safari */
|
||||
if (!isBrowserSafari && document.getElementById('rom-patcher-input-file-' + id)) {
|
||||
try {
|
||||
/* add a fake file to the input file, so it shows the chosen file name */
|
||||
const fakeFile = new File(new Uint8Array(0), fileName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue