Closed jonthysell closed 3 years ago
I can try to find a smaller example repro.
A simple repro app would be a big help, if you could provide it. Thanks!
In the steps to reproduce, before step 4, you have to use the keyboard up or down arrows to navigate the CommandBarFlyout first so that there's a focus rect visible. Makes sense given the exception call stack includes UpdateFocusRect
.
A simple repro app would be a big help, if you could provide it. Thanks!
@llongley Here you go: https://github.com/lyahdav/XamlIslandsFlyoutBug/tree/text-box-for-testing-command-bar-flyout-without-dpi-awareness-with-winui2. This is a plain Islands app with WinUI 2 CommandBarFlyout and the OS XAML CommandBarFlyout. The OS one doesn't have this crash, while WinUI 2 does. I'm pretty sure I saw this crash in a UWP app using WinUI 2 CommandBarFlyout as well, so not specific to Islands. And here's a video of the crash:
https://user-images.githubusercontent.com/359157/130862846-6c44de13-d7c3-4f85-96ec-32e14f93c9b4.mov
Actually when I upgrade that project from Microsoft.UI.Xaml.2.6.1-prerelease.210709001 to Microsoft.UI.Xaml.2.7.0-prerelease.210816001 this crash goes away, so it's been fixed already. @jonthysell you can close this.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.
Describe the bug React Native Windows had a problem with keyboard navigation when using the XAML CommandBarFlyout (https://github.com/microsoft/react-native-windows/issues/8306). They fixed this by switching to the MUX CommandBarFlyout, which fixed keyboard navigation but causes a crash when the flyout closes:
From https://github.com/microsoft/react-native-windows/issues/8306#issuecomment-897267971 :
And call stack:
They were able to workaround the issue by making sure that there are no secondary commands:
Steps to reproduce the bug
Steps to reproduce the behavior:
Expected behavior Flyout closes without crashing.
Screenshots
Version Info
NuGet package version: [Microsoft.UI.Xaml 2.6.1-prerelease]
Additional context