ngx-material-file-input icon indicating copy to clipboard operation
ngx-material-file-input copied to clipboard

Input Value Is Cleared on Cancel After Open

Open maks-humeniuk opened this issue 4 years ago • 5 comments

Steps to reproduce:

  1. Click on input.
  2. Select file, e.g. "readme.txt".
  3. Click Open.
  4. Verify that input value is "readme.txt".
  5. Click on input.
  6. Click Cancel.

Actual behavior: Input value is cleared.

Expected behavior: Input value remains "readme.txt".

maks-humeniuk avatar Nov 23 '20 16:11 maks-humeniuk

I'm also having this problem

kellyprankin avatar Jan 20 '21 07:01 kellyprankin

I'm having this problem too but I've discovered that is the default behaviour: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file

ilbonte avatar Jan 29 '21 10:01 ilbonte

I'm having this problem too but I've discovered that is the default behaviour: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file

It looks like this does not happen in Firefox, but does happen in Chrome

kellyprankin avatar Jan 30 '21 03:01 kellyprankin

Actually I found out that it depends on the browser: on Chrome the file is removed, on Firefox is not

On Sat, 30 Jan 2021, 04:29 kelly, [email protected] wrote:

I'm having this problem too but I've discovered that is the default behaviour: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file

Are you sure about that? I just clicked one of their examples and it didn't remove a previously selected value when I pressed cancel

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/merlosy/ngx-material-file-input/issues/71#issuecomment-770148649, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYRZDCSZO25YC6K2RQYMITS4N4J7ANCNFSM4T7XT7UQ .

ilbonte avatar Jan 30 '21 09:01 ilbonte

Do we have a workaround for this on Chrome?

DantonGodoy avatar Aug 09 '23 14:08 DantonGodoy