You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: react/vue, rendering modal within nav does not bind events #27843
changed the title [-]bug: Modal in IonNav can't listen to click events.[/-][+]bug: react, rendering modal from within nav does not bind click events[/+]on Jul 25, 2023
I found that ion-modal is using CoreDelegate to modify the insertion position of DOM elements at display time, which is causing the react event proxy mechanism to break down. Hopefully this will help speed up the fix.
changed the title [-]bug: react, rendering modal from within nav does not bind click events[/-][+]bug: react, rendering modal from within nav does not bind events[/+]on Jan 17, 2024
I've been struggling with the same issue recently. The workaround I found to enable the usage of IonNav is as follows: (Note: I had actually re-implemented much of my project to use IonNav before I discovered this issue.)
<Modal isOpen={true}>
<IonNav
root={() => (
... The content of your modal.
)}
></IonNav>
</Modal>
So, what I'm doing is adding a nested IonNav for the modal, and it works perfectly. This has been the easiest workaround I've found.
changed the title [-]bug: react, rendering modal from within nav does not bind events[/-][+]bug: react, rendering modal within nav does not bind events[/+]on Jan 25, 2024
changed the title [-]bug: react, rendering modal within nav does not bind events[/-][+]bug: react/vue, rendering modal within nav does not bind events[/+]on Feb 5, 2024
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Activity
[-]bug: [/-][+]bug: Modal in IonNav can't listen to click events.[/+][-]bug: Modal in IonNav can't listen to click events.[/-][+]bug: react, rendering modal from within nav does not bind click events[/+]zhbhun commentedon Aug 21, 2023
I found that ion-modal is using
CoreDelegateto modify the insertion position of DOM elements at display time, which is causing the react event proxy mechanism to break down. Hopefully this will help speed up the fix.ionic-framework/core/src/components/modal/modal.tsx
Line 450 in 77707b8
ionic-framework/core/src/utils/framework-delegate.ts
Line 131 in 77707b8
vu0tran commentedon Nov 29, 2023
Any updates on this one or tips for a workaround?
[-]bug: react, rendering modal from within nav does not bind click events[/-][+]bug: react, rendering modal from within nav does not bind events[/+]mhryshkin commentedon Jan 17, 2024
I've been struggling with the same issue recently. The workaround I found to enable the usage of IonNav is as follows: (Note: I had actually re-implemented much of my project to use IonNav before I discovered this issue.)
So, what I'm doing is adding a nested IonNav for the modal, and it works perfectly. This has been the easiest workaround I've found.
[-]bug: react, rendering modal from within nav does not bind events[/-][+]bug: react, rendering modal within nav does not bind events[/+]averyrousseau commentedon Feb 5, 2024
Confirming that this also reproduces in Vue, but not Angular (including standalone).
[-]bug: react, rendering modal within nav does not bind events[/-][+]bug: react/vue, rendering modal within nav does not bind events[/+]ShaneK commentedon May 20, 2026
Hey everyone! In React I have a PR up now that should fix this: #31159
In Vue, this was fixed some time ago by #30227
fix(react): bind events properly for overlays rendered within a nav (i…
ShaneK commentedon May 20, 2026
Thank you for your patience in this issue. The fix for this has been released in 8.8.8!
ionitron-bot commentedon Jun 19, 2026
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
fix(react): bind events properly for overlays rendered within a nav (i…