Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: ion-router back() fails second time (stencil app), including PR+reproduction #21300

Closed
bitflower opened this issue May 14, 2020 · 5 comments · Fixed by #21301
Closed

bug: ion-router back() fails second time (stencil app), including PR+reproduction #21300

bitflower opened this issue May 14, 2020 · 5 comments · Fixed by #21301
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@bitflower
Copy link
Contributor

bitflower commented May 14, 2020

Bug Report

Ionic version:

[x] 5.1.0
[x] Stencil 1.12.7

Current behavior:
When navigating to a sibling ion-route the back() method of the ion-router fails in such a way that the animations are not running the second and following times. The first time it works.

See this video: https://github.com/bitflower/ion-router-root-bug

ion-router-rootbug

Expected behavior:
The animations always run fine no matter how often a route was visited when we go back.

Steps to reproduce:
Run the repo with npm i then npm start. Navigate to the 2nd page with the link "Go to sibling". Navigate back to the root with the button. Repeat. The 2nd time the animation back to home isn't firing.

Related code:
Repo to easily reproduce: https://github.com/bitflower/ion-router-root-bug

@bitflower
Copy link
Contributor Author

bitflower commented May 15, 2020

The same issue occurs when you use window.history.back() or simply the back button of the browser.

@bitflower bitflower changed the title bug: ion-router back() fails second time (stencil app), including PR bug: ion-router back() fails second time (stencil app), including PR+reproduction May 15, 2020
@bitflower
Copy link
Contributor Author

@simonhaenisch refering to our Slack conversation - what do you think of this fix?

@liamdebeasi liamdebeasi added package: core @ionic/core package type: bug a confirmed bug report labels May 21, 2020
@ionitron-bot ionitron-bot bot removed the triage label May 21, 2020
@Ravenstine
Copy link

I'm noticing this bug as well as a similar one with forward navigation. For example, if I navigate to a URL, nagivate back, then use .push('/my-url') on the router, it may not animate the transition.

@liamdebeasi
Copy link
Contributor

Thanks for the issue. This has been resolved via #21301, and a fix will be available in an upcoming release of Ionic Framework.

Here is a dev build with the fix: 5.2.0-dev.202006081615.e0a066d

@ionitron-bot
Copy link

ionitron-bot bot commented Jul 8, 2020

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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Jul 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants