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: vue, incorrectly routes back when tab is undefined #25705

Closed
4 of 7 tasks
snowwolfjay opened this issue Aug 3, 2022 · 6 comments · Fixed by #25732
Closed
4 of 7 tasks

bug: vue, incorrectly routes back when tab is undefined #25705

snowwolfjay opened this issue Aug 3, 2022 · 6 comments · Fixed by #25732
Labels
package: vue @ionic/vue package type: bug a confirmed bug report

Comments

@snowwolfjay
Copy link
Contributor

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x
  • Nightly

Current Behavior

We use createMemoryHistory to build the router, android is ok.
But when test in ios , strange things happen, need forbid swipe back function which is so bad :
Suppose there is an app with three page, home -> child1 -> child2

  1. launch home page, then nav to child1 ,then nav to child2
  2. swipe back twice to home page,
  3. console log has a error, and then router breaks

Our app has almost 50 pages, and after swipe back twice, router works like chaos, it randomly navigate to some page... or do nothing ...

Expected Behavior

When use memory history and swipe back twice on IOS , router not break

Steps to Reproduce

  1. open cmd , ionic start create new project
  2. pick vue + list template
  3. create a new page, and add a button at detail page which can navigate to the new page.
  4. change the router/index.ts ,replace createWebHistory to createMemoryHistory
  5. ionic serve to preview at browser with devtool open and choose the ios device
  6. nav to detail page then to new page
  7. swipe back and swipe back to home page
  8. console log print the error.

if need test the random nav need create more page and add entry to home page,
after step 8 , try nav to other page can see the router navigate randomly ..

Code Reproduction URL

No response

Ionic Info

Ionic:

Ionic CLI : 6.18.1 (C:\Users\by4474\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : @ionic/vue 6.2.0

Capacitor:

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

Utility:

cordova-res : not installed globally
native-run : 1.6.0

System:

NodeJS : v16.15.1 (C:\Program Files\nodejs\node.exe)
npm : 8.12.1
OS : Windows 10

Additional Information

not now,

@ionitron-bot ionitron-bot bot added the triage label Aug 3, 2022
@snowwolfjay snowwolfjay changed the title bug: [IOS,Vue] when use createMemoryHistory with and swipe back twice, router crashed bug: [IOS,Vue] when use createMemoryHistory and swipe back twice, router crashed Aug 3, 2022
@liamdebeasi
Copy link
Contributor

Thanks for the issue. Can you provide a minimal GitHub repo I can use to verify this behavior?

@liamdebeasi liamdebeasi added the needs: reply the issue needs a response from the user label Aug 3, 2022
@ionitron-bot ionitron-bot bot removed the triage label Aug 3, 2022
@snowwolfjay
Copy link
Contributor Author

Thanks for the issue. Can you provide a minimal GitHub repo I can use to verify this behavior?

https://github.com/snowwolfjay/reproduction-ionic-25705

this is a minimal repo.

@ionitron-bot ionitron-bot bot added triage and removed needs: reply the issue needs a response from the user labels Aug 4, 2022
@liamdebeasi liamdebeasi changed the title bug: [IOS,Vue] when use createMemoryHistory and swipe back twice, router crashed bug: vue, incorrectly routes back when tab is undefined Aug 5, 2022
@liamdebeasi liamdebeasi added package: vue @ionic/vue package type: bug a confirmed bug report labels Aug 5, 2022
@ionitron-bot ionitron-bot bot removed the triage label Aug 5, 2022
@liamdebeasi
Copy link
Contributor

Can you try the following dev build and let me know if it resolves the issue?

npm install @ionic/[email protected] @ionic/[email protected]

@snowwolfjay
Copy link
Contributor Author

Can you try the following dev build and let me know if it resolves the issue?

npm install @ionic/[email protected] @ionic/[email protected]

resolved, thank a lot

@liamdebeasi
Copy link
Contributor

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

fbalbinoribeiro pushed a commit to MEDGRUPOGIT/ionic-framework that referenced this issue Aug 8, 2022
@ionitron-bot
Copy link

ionitron-bot bot commented Sep 7, 2022

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 Sep 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: vue @ionic/vue package type: bug a confirmed bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants