CommunityToolkit / CommunityToolkit/Maui
[BUG] ShowPopupAsync deadlock when ShellNavigatingEventArgs is Cancelled
- 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
Calling Shell.Current.ShowPopupAsync() will hang indefinitely when ShellNavigatingEventArgs is cancelled.
Example
`
protected override void OnNavigating(ShellNavigatingEventArgs args)
{
args.Cancel();
}
`
### Expected Behavior
An Exception should be thrown.
### Steps To Reproduce
1) Override OnNavigating of Shell
2) Call Cancel on ShellNavigatingEventArgs
3) Hang forever
protected override void OnNavigating(ShellNavigatingEventArgs args)
{
args.Cancel();
}
### Link to public reproduction project repository
TODO
### Environment
```markdown
- .NET MAUI CommunityToolkit:
14.0.1
- OS:
Windows
- .NET MAUI:
10.0.41
```
### Anything else?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.