ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
50.92k stars 13.51k forks source link

bug: popping page from ion-nav with animated=false results in non interactive page #25274

Open mwahlhuetter opened 2 years ago

mwahlhuetter commented 2 years ago

Prerequisites

Ionic Framework Version

Current Behavior

When going to a previous page in the nav stack with controller.pop(), where the property animated is set to false, the page navigated to becomes non interactive.

Expected Behavior

When going to a previous page in the nav stack, when animations are disabled, I can interact with it after navigating to it.

Steps to Reproduce

I added a reproduction project with two ion-navs. One with animatiosn enabled and one without. Click on the Button "Breaking" to open the page with the nav component with disabled animations. Then go to the next page and navigate back to the previous page.

Code Reproduction URL

https://github.com/mwahlhuetter/ionic-nav-bug

Ionic Info

Ionic: Ionic CLI : 6.19.0 (/home/mwahlhuetter/.config/yarn/global/node_modules/@ionic/cli) Ionic Framework : @ionic/vue 6.1.4

Capacitor: Capacitor CLI : 3.5.1 @capacitor/android : not installed @capacitor/core : 3.5.1 @capacitor/ios : not installed

Utility: cordova-res : not installed globally native-run : 1.5.0

System: NodeJS : v14.19.1 (/usr/bin/node) npm : 8.5.5 OS : Linux 5.10

Additional Information

I can observe that display:none is not added to the style of the hidden ion-page when disabling the animation.

liamdebeasi commented 2 years ago

Thanks for the issue. The problem here is that we are not correctly cleaning up the wrapper element when popping a page. The .ion-page element is left behind, but since it has the highest z-index it prevents the previous page from being interactive.