diff --git a/src/legacy/file-open.mjs b/src/legacy/file-open.mjs index 8be6376..e158973 100644 --- a/src/legacy/file-open.mjs +++ b/src/legacy/file-open.mjs @@ -51,7 +51,7 @@ export default async (options = [{}]) => { options[0].legacySetup(_resolve, _reject, input); const cancelDetector = () => { - window.removeEventListener('focus', cancelDetector, true); + window.removeEventListener('focus', cancelDetector); input.remove(); }; @@ -60,7 +60,7 @@ export default async (options = [{}]) => { }); input.addEventListener('change', () => { - window.removeEventListener('focus', cancelDetector, true); + window.removeEventListener('focus', cancelDetector); input.remove(); _resolve(input.multiple ? Array.from(input.files) : input.files[0]); });