Bug 220182
| Summary: | <input type="file">: click() doesn't trigger an file upload dialog while using an angular entry component (materals MatBottomSheetRef) | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Barock <l_> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | CC: | ap |
| Priority: | P2 | ||
| Version: | Other | ||
| Hardware: | All | ||
| OS: | All | ||
| URL: | https://angular-wdnpmb.stackblitz.io | ||
Barock
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Barock
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
This is expected behavior. WebKit has required a user gesture to open the file picker for years, see bug 47593.