Skip to content

[BUG] When a Popup is displayed, a warning is displayed and the content of the page from which the Popup is displayed disappears. #1416

@cat0363

Description

@cat0363

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

Build the latest source code of main and display Popup on iOS.
The content of the page from which the Popup is displayed disappears when the Popup is displayed.

iPhone.14.iOS.16.4.2023-09-19.12-33-56.mp4

The following warning message is output when displaying the popup.

[Presentation] Presenting view controller <CommunityToolkit_Maui_Core_Views_MauiPopup: 0x7f97cff7b010> from detached view controller <Microsoft_Maui_Platform_PageViewController: 0x7f97cffa0590> is discouraged.

The above warning message occurs in the following locations.

[src\CommunityToolkit.Maui.Core\Views\Popup\MauiPopup.macios.cs]

void AddToCurrentPageViewController(UIViewController viewController)
{
    viewController.PresentViewController(this, true, null);
}

Expected Behavior

I was hoping that the content of the page from which the Popup was displayed would not disappear when the Popup was displayed, and that the Popup would be displayed as intended.

Steps To Reproduce

The steps to reproduce are as follows.

  1. Launch apps uploaded to GitHub on iOS
  2. Press the Show button

In step 2, the content of the page from which the Popup is displayed will disappear at the same time the Popup is displayed.
Please use the latest source code of main to reproduce.

Link to public reproduction project repository

https://github.com/cat0363/MauiComm-IssuePopupSizePosition.git

Environment

- .NET MAUI CommunityToolkit: Latest version of main at the time this issue was posted
- OS: iOS 16.4
- .NET MAUI: 7.0.92

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions