CommunityToolkit / CommunityToolkit/Maui
[BUG] Popup crashes on close after changing value on a switch button.
- Dominant language
- C#
- Stars
- 2.7k
- Forks
- 500
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 7
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Did you read the "Reporting a bug" section on Contributing file?
- [x] I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug
### Current Behavior
If you add a switch to a Content View used as a popup page and then click on switch button to change its value and leave the page it will crash the app. If you do nothing and just close the page it will not crash. Interacting with a switch will crash an app when closing a popup.
Oddly this does not appear to be an issue in Toolkit sample app.
### Expected Behavior
If you manipulate a switch it should not cause an app crash when closing a popup.
### Steps To Reproduce
1. Open included solution and run it.
2. Click on button.
3. In popup click on switch button.
4. Click outside popup.
5. App crashes.
### Link to public reproduction project repository
https://github.com/ne0rrmatrix/SimplePopupBug
### Environment
```markdown
- .NET MAUI CommunityToolkit: 12.1.0
- OS: Windows 10 Build 10.0.19041.0
- .NET MAUI: 9.0.90
```
### Anything else?
This issue can be replicated by included code. There are many other ways that you can create a popup that will replicate the behavior. If you do not have a switch or do not click or interact with switch popup behaves as expectedd.
Contributor guide
Assessment
This issue has not been assessed yet.