[Webkit-unassigned] [Bug 234566] New: <input type="file"> fails to show and displays inappropriate file types
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Dec 21 09:34:31 PST 2021
https://bugs.webkit.org/show_bug.cgi?id=234566
Bug ID: 234566
Summary: <input type="file"> fails to show and displays
inappropriate file types
Product: WebKit
Version: Safari 15
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: webkit at goldwave.com
First issue:
Using the following code, when the Open button is clicked the file picker window does not appear. It does appear on Chrome and Firefox. This kind of deferred display is necessary for multi-threaded web apps. A webworker may be sending a message to display the file picker. However Safari does not show it presumable because the original click event is not considered in this context.
<input id="file" style="display:none" type="file" accept=".m4a,.mp3,.wav,.ogg,audio/*">
<button onclick="show=true">Open</button>
<script>
const file = document.getElementById( 'file' );
var show = false;
setInterval( () => { if ( show ) { show = false; file.click(); } }, 200 );
</script>
Second issue:
When displaying the file picker on iOS, it always displays a popup for "Photo Library", "Take Video", and "Choose File" even when "accept" does not specify images or video. This is a very inappropriate and unnecessary popup when an app is accepting only audio files, only PDF files, etc.
Third issue:
On iOS there is no change in focus when the popup or file picker appears. Many developers rely on focus changes to determine if the file picker was cancelled (because there is no cancel event in the specification).
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211221/1de1d463/attachment.htm>
More information about the webkit-unassigned
mailing list