Skip to content

Commit

Permalink
No useCapture
Browse files Browse the repository at this point in the history
  • Loading branch information
tomayac committed May 22, 2023
1 parent 42e02c1 commit a09cc75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/legacy/file-open.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
};

Expand All @@ -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]);
});
Expand Down

0 comments on commit a09cc75

Please sign in to comment.