-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dragged file input still shows required alert #3673
Comments
I think I've discovered the issue that causes this. it is our Let me try a few things to get around this. |
PR #3674 appears to fix this issue |
After playing with this a bit... (I wasn't involved with the original drag and drop handling), it is the dropzone that handles the dragged files (the label in this case), not the file input. And drag/drop bypasses the file input element events. Will have to think of a way to set the input validity based on the dropped files (required, plus files types) |
@hkchakladar Since you are controlling state of the input (via the See https://codesandbox.io/s/form-required-drag-29onl If you want to have the validation state / message only showing, then you can compute the validation state in the submit handler of the form. |
PR #3674 appeared to fix the issue, but has caused other side-effects. |
) * feat(b-form-file): improved drag and drop handling * Update form-file.js * Update form-file.js * Further implementation * Update form-file.spec.js * add global `stopEvent()` util * Improve tests * Update form-file.spec.js * Update form-file.js * Update form-file.js * Update form-file.js * Update form-file.js * Update common-props.json * Update form-file.js * Update package.json * Update form-file.js * Update README.md * Update form-file.js * Update index.d.ts * Update README.md * Keep current event prevent behavior * Update form-spinbutton.js Co-authored-by: Hiws <hiws@live.dk>
Describe the bug
When
required
is used inb-form-file
and a file is dragged, it still shows select a file alert on submit.It works fine with selecting file from the popup file system.
Steps to reproduce the bug
Choose a file
and select a file from the selector.Expected behavior
Choose a file
and select a file from the selector.The text was updated successfully, but these errors were encountered: