tabris-js icon indicating copy to clipboard operation
tabris-js copied to clipboard

`WebView` with a `<input type="file">` in the HTML works on iOS but not on Android.

Open violuke opened this issue 4 years ago • 2 comments

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:

Screenshot 2021-12-23 at 12 26 49 pm

Thanks for your help :+1:

violuke avatar Dec 23 '21 12:12 violuke

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.

mknauer avatar Dec 23 '21 13:12 mknauer

Support for it is indeed available in the latest nightly.

mpost avatar Dec 23 '21 16:12 mpost