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: ion-menu's swipe-gesture causes error on other pages #31314
I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v8.x
Current Behavior
On iOS, if you add ion-menu with swipe-gesture enabled on a page, and then navigate to a different page, and swipe from left side of screen to the right, there is a javascript error:
Verified on 9.0.8. When you navigate away from a page, Ionic keeps that page in the DOM and hides it, but an ion-menu inside it keeps listening for edge swipes across the whole screen. A swipe from the edge then drives a menu that has no width. When the swipe comes back past its starting point, the swipe step works out to 0 / 0, which throws the non-finite error. A plain swipe to the right doesn't throw, but it opens the hidden menu, so you find it already open when you go back to that page.
Workarounds, both verified on 9.0.8:
If one menu serves the whole app, place ion-menu in App.vue next to ion-router-outlet instead of inside a page.
If the menu has to live in the page, disable it while the page is hidden:
Activity
thetaPC commentedon Oct 21, 2026
Thanks for the report, and sorry for the delay.
Verified on 9.0.8. When you navigate away from a page, Ionic keeps that page in the DOM and hides it, but an
ion-menuinside it keeps listening for edge swipes across the whole screen. A swipe from the edge then drives a menu that has no width. When the swipe comes back past its starting point, the swipe step works out to0 / 0, which throws the non-finite error. A plain swipe to the right doesn't throw, but it opens the hidden menu, so you find it already open when you go back to that page.Workarounds, both verified on 9.0.8:
ion-menuinApp.vuenext toion-router-outletinstead of inside a page.Tracked as a bug in
core.thetaPC commentedon Oct 21, 2026
Update: this turned out to be the same issue as #19410, which tracks the fix. The workaround above still applies.
Closing this as a duplicate of #19410. Sorry!