question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OpenFileDialog doesn't select a file, just when it switches the focus to another app and go back

See original GitHub issue

Describe 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:

  1. Open avalonia app
  2. Display the OpenFileDialog
  3. Try to select a file
  4. 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

https://user-images.githubusercontent.com/43356162/225033615-a9ec8a22-b908-4020-9eee-2fcb0941740b.mov

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:closed
  • Created 6 months ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
maxkatz6commented, Mar 18, 2023

Please check 11.0 previews

0reactions
ClayAchahuicommented, Mar 21, 2023

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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Qt Application switches focus to a different application after ...
When I open and select a file with QFileDialog::getOpenFileName() , the focus switches to some other app and I have to alt-tab back...
Read more >
How to open file dialog on starting app
I have a WinForms app in Visual C#. When I initially open the app, I want to automatically open an OpenFileDialog so the...
Read more >
In non-native applications, in the Open File dialog, I can ...
When I use the Open File Dialog, I can see the hidden files, but I can not select them or interact with them...
Read more >
2. Loading Data
The Open File dialog automatically detects file series and shows them as a grouped element, as shown in Fig. 2.2. To load the...
Read more >
Windows 7 Explorer keyboard shortcut: set focus to files ...
Here's what I've been doing: - Tab / Shift+Tab to move focus through interactive window elements until it looks like a selection rectangle ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found