Skip to content
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

promptForFiles ignores the accept attribute #50

Open
goulvench opened this issue Jan 5, 2024 · 0 comments
Open

promptForFiles ignores the accept attribute #50

goulvench opened this issue Jan 5, 2024 · 0 comments

Comments

@goulvench
Copy link

I'm using Droppable to allow drag'n dropping files on regular file inputs, and I noticed that the accept attribute was ignored.
That's because the virtual input used in promptForFiles does not copy the accept value.

Since I'm using plain inputs, turning isClickable: false (instead of true, the default) allows the native filepicker to open, including its accept, which solves the issue for me in this case.

When the element is a regular file input, it would be more intuitive to copy the input's multiple and accept attributes to the virtual input used in promptForFiles, and only use the defaults otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant