[BUG] Only gallery file selection appearing with a styled dropzone on latest Chrome mobile versions on android 14+
#1 417 ouverte le 14 févr. 2025
Description
Describe the bug Clickable content inside a Dropzone component does not bring up an option to use the camera (take a photo) on Android 14 devices and using the latest Chrome browser version - only the gallery file selection opens up (the bug only appears behind https, works in localhost)
Possible fix When removing all of the style from the input[type="file"], the correct options appear on tap with Android devices, just without any custom styling for the dropzone while hiding the native file input
To Reproduce An example to test with an android device with the latest chrome version:
Using mantine's dropzone that uses the latest react-dropzone: https://codesandbox.io/p/github/madhenry/next-app-min-template/draft/awesome-aryabhata?embed=1&file=%2Fapp%2Fpage.tsx
Also reproducible via react-dropzone web:
https://react-dropzone.js.org/#!/Basic%20example (camera option appears correctly) https://react-dropzone.js.org/#!/Styling%20Dropzone (camera option does not appear)
Expected behavior Camera + gallery option would appear on click/tap with the latest android chrome versions
Screenshots
Working as expected:
Bug with a styled dropzone just opens the gallery:
Smartphone (please complete the following information):
- Device: Android phones / tablets
- OS: Android 14+
- Browser: Chrome (latest)
- Version: 133.0.6943.49+
Additional context Mantine Dropzone component src: https://github.com/mantinedev/mantine/blob/master/packages/%40mantine/dropzone/src/Dropzone.tsx
Have not yet find a solution other than removing all styling from the native input for android devices so far - but interestingly enough the basic example on react-dropzone seems to be working still