-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve handling of visual feedback showing the dropzone
- Only show the dropzone when the user drags into it rather than when entering the document. This will prevent multiple announcements when we add feedback for screenreaders, in case there's multiple `FileUpload`s on the page - Add a test to check if the user is dragging files before showing dropzone - Fix disappearance of the dropzone due to many `dragleave` events being triggered as user drags over the different elements inside the wrapper - Separate the handler of `drop` event as it doesn't need the same complexity as the `dragleave` one before hiding the dropzone. The component still relies on the native `<input>` receiving the files being dropped, as it ensures a `change` event gets triggered on drop (which we'd have to simulate if setting its `files` properties programmatically).
- Loading branch information
1 parent
d52283f
commit 7c5e8e6
Showing
1 changed file
with
71 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters