CommunityToolkit / CommunityToolkit/Labs-Windows
[TokenView] VirtualKey right and left or GamepadDPadRight and Left crashes the app
- Dominant language
- C#
- Stars
- 482
- Forks
- 89
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug
If you click VirtualKey.Right or VirtualKey.Left when you focused on the scroll right or left button of the TokenView control, the app will instantly crash. The only way to bypass this is to enable 'IsWrapped'.
Pacakge version: 0.1.251217-build.2433
### Steps to reproduce
```text
1. Make the app's window width small enough to show the scroll button of the TokenView.
2. Keep clicking the 'Tab' button until the scroll forward button is focused. [Or simply use a controller will do the same trick]
3. Click the right or left or any direction key on the keyboard. [Gamepad's direction will repro the crash as well]
4. The app successfully crashes.
```
### Expected behavior
No crash.
### Screenshots
### Code Platform
- [x] UWP
- [ ] WinAppSDK / WinUI 3
- [ ] Web Assembly (WASM)
- [ ] Android
- [ ] iOS
- [ ] MacOS
- [ ] Linux / GTK
### Windows Build Number
- [ ] Windows 10 1809 (Build 17763)
- [ ] Windows 10 1903 (Build 18362)
- [ ] Windows 10 1909 (Build 18363)
- [ ] Windows 10 2004 (Build 19041)
- [ ] Windows 10 20H2 (Build 19042)
- [ ] Windows 10 21H1 (Build 19043)
- [x] Windows 11 21H2 (Build 22000)
- [ ] Other (specify)
### Other Windows Build number
_No response_
### App minimum and target SDK version
- [ ] Windows 10, version 1809 (Build 17763)
- [ ] Windows 10, version 1903 (Build 18362)
- [ ] Windows 10, version 1909 (Build 18363)
- [ ] Windows 10, version 2004 (Build 19041)
- [ ] Other (specify)
### Other SDK version
_No response_
### Visual Studio Version
_No response_
### Visual Studio Build Number
_No response_
### Device form factor
Desktop
### Additional context
_No response_
### Help us help you
No, I'm unable to contribute a solution.
Contributor guide
Assessment
This issue has not been assessed yet.