Bug 220182 - <input type="file">: click() doesn't trigger an file upload dialog while using an angular entry component (materals MatBottomSheetRef)
Summary: <input type="file">: click() doesn't trigger an file upload dialog while usi...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: Other
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: https://angular-wdnpmb.stackblitz.io
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-28 02:02 PST by Barock
Modified: 2020-12-30 12:28 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.