react-new-window icon indicating copy to clipboard operation
react-new-window copied to clipboard

Opening Modals in the new window

Open sanghaiadarsh opened this issue 4 years ago • 9 comments

I am facing an issue when working with modal in my components. When the child components (which have been opened in a new child window) have a modal, it opens in the Parent window rather than in the new window itself.

Any idea what might be the solution for this?

sanghaiadarsh avatar May 07 '21 02:05 sanghaiadarsh

react-new-window is using ReactDOM.createPortal().

To get your new window to be the parent of another modal(portal) you may need to use the same technique.

See: https://reactjs.org/docs/portals.html

RyanNerd avatar May 13 '21 09:05 RyanNerd

I am also facing same issue? Can you provide actual working example that is solving this problem?

pawan-khade avatar May 29 '21 13:05 pawan-khade

I have tried using portals but no success.

pawan-khade avatar May 29 '21 13:05 pawan-khade

I would love to help if someone can provide a reproducible scenario with the issue.

rmariuzzo avatar Oct 21 '21 03:10 rmariuzzo

Hello! any luck with this issue? My popups are showing in the parent window, not in the new one. Thanks in advance.

NTCarlos avatar Mar 15 '22 20:03 NTCarlos

Hello! any luck with this issue? My popups are showing in the parent window, not in the new one. Thanks in advance.

Do you have an example in https://codesandbox.io/ or something similar that shows the issue?

RyanNerd avatar Mar 17 '22 13:03 RyanNerd

I would love to address this issue. If someone can't provide an example, can someone let me know which library are you using for modals.

rmariuzzo avatar Nov 27 '22 04:11 rmariuzzo