MicrosoftEdge / MicrosoftEdge/WebView2Feedback

UWP WinUI2 file open dialog for folder doesn't open

Open
#3,275 1 comment 0 reactions 1 assignee View on GitHub

@david-risney is already working on this.

Since Mar 8, 2023.

bug tracked
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Description

The input element for choosing a file works but for choosing a directory fails silently in UWP. I tried with latest stable and canary runtimes in the win32 sample app and the UWP WinUI2 sample app and found that the runtime doesn't make a difference, choosing a directory fails silently in UWP and works in Win32.

<!-- Fails in UWP WinUI2, works elsewhere -->
<input type="file" id="FileUpload1" webkitdirectory multiple />
<input type="file" id="FileUpload4" webkitdirectory  />
<!-- Works -->
<input type="file" id="FileUpload2"  />
<input type="file" id="FileUpload3" multiple  />

Version
SDK: 1.0.1018.0
Runtime: Canary 112.0.1722.0, and Stable 110.0.1587.63
Framework: WinUI2 UWP
OS: Win11

Repro Steps
In a WebView2 navigate to https://jsfiddle.net/wkd9p5hj/, press Run, and then click on the first Choose Files button.

Expected: Open file dialog appears
Actual: Nothing happens

AB#43679861

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.