We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d95024 commit f5a056bCopy full SHA for f5a056b
1 file changed
pkg/emscripten/libretro-thread/libretro.js
@@ -208,14 +208,18 @@ function uploadFiles(accept) {
208
input.type = "file";
209
input.setAttribute("multiple", "");
210
if (accept) input.accept = accept;
211
- input.onchange = async function() {
+ input.style.setProperty("display", "none", "important");
212
+ document.body.appendChild(input);
213
+ input.addEventListener("change", async function() {
214
let files = [];
215
for (const file of this.files) {
216
files.push({path: file.name, data: await readFile(file)});
217
}
218
+ document.body.removeChild(input);
219
resolve(files);
- }
220
+ });
221
input.oncancel = function() {
222
223
resolve([]);
224
225
input.click();
0 commit comments