Ionic-framework: bug: ionic vue swipe to go back not working correctly

Created on 2 Oct 2020  路  9Comments  路  Source: ionic-team/ionic-framework

Bug Report

Ionic version:
[x] 5.0.2

Current behavior:
Navigating back goes back to "Friends" instead of "Search". See GIF: https://gyazo.com/322f69010df94992f34cf4e113757547

Expected behavior:
When navigating back we should end up on "Search".

Steps to reproduce:
I can share my repo if necessary, but it should be just to setup a Tabs app with a child route.

Related code:
I am trigging the navigation using useRouter() then this.router.back().

This is what my router looks like:

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    redirect: '/tabs/search'
  },
  {
    path: '/tabs/',
    component: Tabs,
    children: [
      {
        path: '',
        redirect: 'search'
      },
      {
        path: 'search',
        component: () => import('@/views/Search/Search.vue'),
        children: [
          {
            path: ':id',
            component: () => import('@/views/Search/Activity.vue'),
          },
        ],
      },
      {
        path: 'friends',
        component: () => import('@/views/Friends/Friends.vue')
      },
      // ...

Ionic info:

Ionic:

   Ionic CLI       : 6.11.8-testing.0 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework : @ionic/vue 0.5.2

Capacitor:

   Capacitor CLI   : 2.4.2
   @capacitor/core : 2.4.2

Utility:

   cordova-res                          : 0.15.1
   native-run (update available: 1.2.1) : 1.1.0

System:

   NodeJS : v13.13.0 (/usr/local/bin/node)
   npm    : 6.14.5
   OS     : macOS Catalina
vue bug

All 9 comments

Thanks for the issue. Could you provide a full repo? I am not seeing this on my end.

My issue is it will navigate to the correct URL, but it will render in the ion-tabs even though the route I have navigated to has no tabs.

This doesn't always happen, but it does happen if I navigate to a few tabs and then go back.

Can you provide some specific steps to reproduce the issue? I can try to reproduce again in a tabs starter app.

Here is a repo with instructions: https://github.com/Livijn/tabs-navigation-debug

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

npm install @ionic/[email protected] @ionic/[email protected] --save-exact

Yes, it resolved the bug 馃憤 馃榿

Great! I am going to keep this issue open until I can get https://github.com/ionic-team/ionic-framework/pull/22288 merged in.

Thanks for the issue. This has been resolved via https://github.com/ionic-team/ionic-framework/pull/22288, and a fix will be available in an upcoming release of Ionic Framework.

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.

Was this page helpful?
0 / 5 - 0 ratings