OpenFileDialog doesn't select a file, just when it switches the focus to another app and go back
See original GitHub issueDescribe the bug I can not select a file when the OpenFileDialog is showed, it seems to be blocked, but when I switch to another app and I go back to avalonia app it works well.
To Reproduce Steps to reproduce the behavior:
- Open avalonia app
- Display the OpenFileDialog
- Try to select a file
- See error
Expected behavior Be able to select a file without switching the focus to another app
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: MAC
- Monterey 12.6
Additional context I’m working with MVVM and I have the OpenFileDialog in class which is like a service. ` async Task<string[]> OpenFile (object parent = null, string title = default, bool allowMultiple = false, string filterName = null, string[] extensionFilter = null, string defaultFolder = null, string defaultName = null) { parent = parent ?? LMApp.Current.GUIToolkit.MainController; List<FileDialogFilter> filters = GetFilters (filterName, extensionFilter);
var dialog = new OpenFileDialog {
Title = title,
AllowMultiple = allowMultiple,
Filters = filters,
Directory = defaultFolder,
InitialFileName = defaultName
};
return await dialog.ShowAsync (parent as Window);
}
`
Issue Analytics
- State:
- Created 6 months ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Please check 11.0 previews
I tried to replicate the issue on my machine using .net 6, net472 and 0.10.18 of Avalonia. It seems to be working well in Avalonia. I will close this Issue. Thanks!