cordova-android icon indicating copy to clipboard operation
cordova-android copied to clipboard

File input doesn't select a file when using a sidebar app

Open HarelM opened this issue 5 years ago • 4 comments

Bug Report

Problem

When selecting an app from the sidebar when opening a file the file is not sent back to the app.

What is expected to happen?

When I select a file using an app from the sidebar the file should be selected.

What does actually happen?

The file is selected in the other app and returns to the file picker screen and does not return to the app

Information

Steps to reproduce:

  1. Create a <input type="file"> element
  2. Click that element to open the android file picker
  3. Click the hamburger at the top to open the sidebar
  4. Click on an app from the sidebar menu, the most easy use case is the file manager
  5. Select a file inside the file manager app
  6. The file should be sent to the cordova app but instead it only returns back to the screen with the sidebar.

Using the same sequence in the browser allows the site to get the selected file. So the browser implementation is the expected behavior.

Command or Code

I don't think anything besides an <input type="file" change="alert('back!')" />

Environment, Platform, Device

Android, I've tested it both in samsung 8 and xiomi redmi 3, but I think most devices is affected by this.

Version information

Cordova 9.0.0 I've tried to upgrade to cordova-android 9.0 to solve this, but the issue still exists. I've verified it also in cordova-android 8.1

Checklist

  • [x] I searched for existing GitHub issues
  • [x] I updated all Cordova tooling to most recent version
  • [x] I included all the necessary information above

I would love to help out solving this, but I couldn't find where the relevant code is.

HarelM avatar Jul 07 '20 19:07 HarelM

Accidentally pressed the enter button before fully filling the form. I'll fill it now.

HarelM avatar Jul 07 '20 19:07 HarelM

I've updated the issue, please let me know if there's anything else I can do to help. I really like Cordova and would love to contribute back.

HarelM avatar Jul 07 '20 20:07 HarelM

Hi, @HarelM. I'm also suffering from this bug in my app. Is there any update?

michaelgo-tr avatar Oct 04 '20 11:10 michaelgo-tr

Not that I know of. I haven't tried the latest version of android-cordova, I'm still using 8.1, thought I don't have high hopes this is solved there as no one seems to have contacted me regarding this issue... @maintainers?

HarelM avatar Oct 04 '20 11:10 HarelM