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: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: ap
Priority: P2    
Version: Other   
Hardware: All   
OS: All   
URL: https://angular-wdnpmb.stackblitz.io

Description Barock 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.
Comment 1 Barock 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
Comment 2 Alexey Proskuryakov 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.