-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Description
Describe the bug
Using an <input type="file" onChange={onChangeHandler} /> component will bring up a file chooser to chose your files (i.e. for uploads). The problem is, that at least on macOS/Chrome, once the dialog box disappears after you chose the file, this triggers the refetchOnFocus event (if enabled). This bug cost me hours to debug, as the onChangeHandler was never called - the refetch triggered a re-render and thus the component was unmounted (and remounted) before the onChangeHandler actually could fire.
To Reproduce
Steps to reproduce the behavior:
- Use any
<input type="file" onChange={onChange} /> - Click on "Choose file" and select a file
- Observe the refetchOnFocus (possibly triggering a re-render)
- onChange handler is not fired
Expected behavior
The <input type="file" /> dialog should be exempted from the refetchOnFocus event
Desktop (please complete the following information):
- OS: macOS
- Browser: latest Chrome
mrxsal
Metadata
Metadata
Assignees
Labels
No labels