Skip to content

Commit

Permalink
Mac: Fix crash when selecting file with space in name from WebView
Browse files Browse the repository at this point in the history
  • Loading branch information
cwensley committed Jan 10, 2021
1 parent 8be7d55 commit a3b2e6d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Eto.Mac/Forms/Controls/WKWebViewHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,10 @@ public override void RunJavaScriptTextInputPanel(wk.WKWebView webView, string pr

public override void RunOpenPanel(wk.WKWebView webView, wk.WKOpenPanelParameters parameters, wk.WKFrameInfo frame, Action<NSUrl[]> completionHandler)
{
var openDlg = new OpenFileDialog();
var openDlg = new OpenFileDialog { MultiSelect = parameters.AllowsMultipleSelection };
if (openDlg.ShowDialog(Handler.Widget.ParentWindow) == DialogResult.Ok)
{
completionHandler(openDlg.Filenames.Select(r => new NSUrl(r)).ToArray());
completionHandler(openDlg.Filenames.Select(r => NSUrl.FromFilename(r)).ToArray());
}
else
{
Expand Down

0 comments on commit a3b2e6d

Please sign in to comment.