callstack / callstack/react-native-paper

Menu + Navigation is not clearing the PortalManager

Open
#4,319 3 comments 0 reactions 0 assignees View on GitHub
Portal question
Dominant language
TypeScript
Stars
14.5k
Forks
2.2k
Avg merge
5d 23h
Merged PRs (30d)
12

Description

I am running into an issue that if a navigate on a menu item press, the PortalManager is not getting cleared out and then capturing subsequent screen interactions. I am doing some pretty simple navigation using the following code:

```jsx
const closeMenu = () => {
console.log('closeMenu');
setVisible(false);
};

const navigateToStaticWebView = (itemKey: string) => {
navigation.push('StaticWeb', {
...webViews[itemKey as keyof typeof webViews],
});
};
```

And here is the menu item that is calling it:
```jsx
{
closeMenu();
navigateToStaticWebView('about');
}}
/>
```

I figure that I am just doing something dumb or missing something simple, but this has been throwing me for a loop for a few days. Any help or documentation would be greatly appreciated, thanks.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the provided Menu.Item flow: call closeMenu, then navigateToStaticWebView with navigation.push, and observe whether PortalManager still captures screen interactions. Trace the Menu and PortalManager behavior during navigation; done means navigating from the menu clears PortalManager so subsequent screen interactions reach the destination screen.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
frontend, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.