`WebView` with a `<input type="file">` in the HTML works on iOS but not on Android.
Problem description
On Android when clicking into an <input type="file"> HTML element within a WebView, nothing happens.
Expected behavior
A modal should appear to ask to select a file/photo or open the camera to take a photo, as happens on iOS.
Environment
- Tabris.js version: Tested on multiple versions, 3.7+ including nightly
- Device: Samsung A10 and Honor 10
- OS: Android 10/11
Code snippet
The WebView is pointing at a URL, not being given HTML directly. I've not tried direct HTML.
import {contentView, TextInput, WebView} from 'tabris';
contentView.append(
<$>
<WebView stretchX bottom top='prev() 8' url="https://viljamis.com/filetest/"/>
</$>
);
Playground:
Thanks for your help :+1:
This is a funny coincidence. I encountered exactly the same problem a fortnight ago in one of my client projects and asked the developers to provide this feature.
I'm sure the Tabris.js team will comment themselves, but file chooser support is already implemented and available in the latest nightly Android platform builds.
Support for it is indeed available in the latest nightly.