-
Notifications
You must be signed in to change notification settings - Fork 1k
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
bug: Selecting single image from samsung gallery does not work with a multiple input field #6758
Comments
I can't reproduce. |
We just realized we only tested this on Samsung devices and the app in question is the "Samsung Gallery" and not the default Android gallery. This might be an issue with Samsung devices only. There is another bug report that is also about Samsung device. |
What's the Android version of the Samsung devices you tested? On the other hand, removing the item count check doesn't seem to break the input file for other devices, so we could probably delete it if it causes problems with some vendors/apps, I still have to do more intensive checking in more devices with different Android versions. The truth is |
This issue has been labeled as |
I was able to reproduce on a galaxy M device from browserstack when using samsung gallery app and I have verified that removing the file count check doesn't break on any of my other devices. |
Thanks for fixing this issue! Me at my company were having bad time finding the reason for this issue. Thanks Capacitor team! |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out. |
Bug Report
Capacitor Version
Platform(s)
Android
Current Behavior
When you have a
<input multiple>
field and select a single image from the Android Gallery, the input field does not receive any data. It works fine when multiple images are selected or when selecting a single image from any other source.We debugged the issue and found the root cause here:
capacitor/android/capacitor/src/main/java/com/getcapacitor/BridgeWebChromeClient.java
Line 431 in 1b8352d
If we change the condition to > 0, then the input field behaves as expected.
Expected Behavior
It should be possible to select a single image from the Android Gallery when using a multiple input field.
Code Reproduction
Reproducer: https://github.com/divatzk/capacitor-file-upload-test
The reproducer contains only one page with a single and a multiple input field. To reproduce the issue, click on the multiple input field and select a single image from the Gallery. Nothing happens in this case. If you select 2 or more images, it works.
Note: This is the same as #6710 which was closed by the bot even though it had a reproducer.
The text was updated successfully, but these errors were encountered: