Pivot control becomes a focus trap when a keyboard accelerator causes a child listview to be cleared #648
Labels
area-FocusManager
Focus APIs such as Control.Focus(), FocusManager.Try[Move]Focus[Async], keyboarding with [shift+]tab
needs-winui-3
Indicates that feature can only be done in WinUI 3.0 or beyond. (needs winui 3)
no-issue-activity
team-Reach
Issue for the Reach team
Projects
Describe the bug
This bug is very specific. Given a PivotItem containing a ListView with items and a Button that clears the list, the Pivot becomes a focus trap if the Button has focus and is invoked by keyboard accelerator.
Visual tree shows focus is stuck on the Pivot's
HeaderClipper
element.Steps to reproduce the bug
Sample app is available here: https://github.com/danbelcher-MSFT/PivotFocusTrapRepro
The specific changes I made for this to repro can be found in this commit: danbelcher-MSFT/PivotFocusTrapRepro@621fa71
To repro, add a few items to the list, navigate to the Delete button, and press Ctrl+L to invoke. Navigate to the Pivot header and observe that focus is trapped.
The bug only seems to repro if the button is invoked by keyboard accelerator. If invoked with mouse/space, the bug does not repro.
Expected behavior
Pivot should not become a focus trap. Behavior should not be different if the Button is invoked with keyboard accelerator vs other methods.
Version Info
Bug repros in XAML framework.
NuGet package version:
Bug also repros in Windows Calculator's History/Memory list.
[Microsoft.UI.Xaml 2.1.190405004.2]
The text was updated successfully, but these errors were encountered: