dotnet / dotnet/maui

CommunityToolkit.Popups and Shell doesn't like each other

Open
#7,941 16 comments 2 reactions 0 assignees View on GitHub
area-controls-shell p/2 partner platform/ios platform/macos s/needs-attention s/triaged s/verified t/bug
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 10h
Merged PRs (30d)
297

Description

### Description

After debugging and investigating some bugs on `PopupView` control I realized that most of the bugs are caused when the dev uses `Shell`, what's sad because `Shell` is the new way to go for mobile apps with .NET MAUI. Otherwise, if the `MainPage` is a regular `ContentPage` or a `NavigationPage` everything works as expected.

In this bug when I open the popup directly on the first page its content disappears (iPhone) or the app crashes (macOS).

During my debug sessions I couldn't find anything that could indicate that issues are on my end (but I don't discard this possibility), and the `PopupView` behaves differently depending on the scenario, so I'm opening a bug report here to ask for some help to see if maybe there's something on `Shell`.

Reproduction:

[MauiTestApp.zip](https://github.com/dotnet/maui/files/8882742/MauiTestApp.zip)

### Steps to Reproduce

1. Open the attached project
2. Open the MainPage.xaml.cs
3. Follow the instructions on the page

### Version with bug

6.0 (current)

### Last version that worked well

Release Candidate 2

### Affected platforms

iOS, macOS

### Affected platform versions

iOS 15.5

### Did you find any workaround?

They are described on the repro.

### Relevant log output

```shell
On iOS:

2022-06-10 20:50:24.171262-0300 MauiTestApp[14632:3865149] [Presentation] Presenting view controller from detached view controller is discouraged.
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.