RESOLVED INVALID 220182
<input type="file">: click() doesn't trigger an file upload dialog while using an angular entry component (materals MatBottomSheetRef)
https://bugs.webkit.org/show_bug.cgi?id=220182
Summary <input type="file">: click() doesn't trigger an file upload dialog while usi...
Barock
Reported 2020-12-28 02:02:12 PST
I tried to trigger a click event on an input element with type "file" after an entry component was closed. But in a browser with WebKit Engine this doesn't work. I have prepared an example on StackBlitz! The result: https://angular-wdnpmb.stackblitz.io In a WebKit-Browser: Click on the button "should open modal". A modal appears on bottom. Click on "file upload" but no file upload dialog appears! The very simple and clean code: https://stackblitz.com/edit/angular-wdnpmb?embed=1 If you debug you can see that every thing is fine. The line 15 in app.component.ts is proceed correctly.
Attachments
Barock
Comment 1 2020-12-28 02:07:28 PST
PS: I want to discuss this on stackoverflow in early 2019 but it was closed quickly with no comprehensible explanation. Very sad. https://stackoverflow.com/questions/57556898/nativeelement-click-doesnt-trigger-on-ios-safari-webkit
Alexey Proskuryakov
Comment 2 2020-12-30 12:28:02 PST
This is expected behavior. WebKit has required a user gesture to open the file picker for years, see bug 47593.
Note You need to log in before you can comment on or make changes to this bug.