PrismLibrary / PrismLibrary/Prism

Add Support for Maui Community Toolkit Popups

Open
#3,350 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement MAUI
Dominant language
C#
Stars
6.8k
Forks
1.6k
Avg merge
2d 1h
Merged PRs (30d)
1

Description

Description

I am getting this error while trying to close Maui CommunityToolkit popups
{System.NullReferenceException: Object reference not set to an instance of an object. at Prism.Ioc.IContainerProviderExtensions.Resolve[INavigationService](IContainerProvider provider) in /_/src/Prism.Container.Abstractions/IContainerProviderExtensions.cs:line 16 at Prism.Navigation.Xaml.Navigation.GetNavigationService(Page page) in D:\a\Prism\Prism\src\Maui\Prism.Maui\Navigation\Xaml\Navigation.cs:line 122 at Prism.Navigation.PrismWindow.PrismWindow_ModalPopping(Object sender, ModalPoppingEventArgs e) in D:\a\Prism\Prism\src\Maui\Prism.Maui\Navigation\PrismWindow.cs:line 87

here is the link to sample project https://github.com/faizkhan005/PrismPopupIssues

Steps to Reproduce
  1. Download the sample project and run
  2. on main page press Sample Popup button (popup appears)
  3. now try clicking outside the popup error message is thrown
Platform with bug

.NET MAUI

Affected platforms

iOS, Android

Did you find any workaround?

No response

Relevant log output

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the linked PrismPopupIssues sample and reproducing the exception when dismissing the popup on iOS or Android. Trace the modal-popping path in src/Maui/Prism.Maui/Navigation/PrismWindow.cs and navigation lookup in src/Maui/Prism.Maui/Navigation/Xaml/Navigation.cs, then verify that closing the popup no longer throws the reported NullReferenceException.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.