Skip to content

bug: Swipe back gesture breaks with Ionic React Router on certain parameterized route changes  #27900

Open

Description

@aeharding

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

With Ionic React Router, swipe back gesture breaks when navigating in certain use cases between parameterized routes.

Expected Behavior

Swipe back gesture works.

Steps to Reproduce

Reproduction A

Assumed Ionic React Router app routes

Assume app with two routes in the router:

  • /foo/:user
  • /baz

Repro

  1. Navigate /foo/alex
  2. Navigate /baz
  3. Navigate /foo/sean
  4. Swipe back once (successful)
  5. Try to swipe back again, observe it is not possible (you need to hit the back button of the browser or in the header)

https://github.com/aeharding/ionic-27900-a

Reproduction B

Assumed Ionic React Router app routes

  • /:name
  • /:name/details

Repro

  1. Go to /one
  2. Replace route with /two
  3. Go to /two/details
  4. Observe swipe back is broken

https://github.com/aeharding/ionic-27900-b

Code Reproduction URL

No response

Ionic Info

N/A

Additional Information

This issue has been created from #26524 (see comments #26524 (comment) and #26524 (comment))

Activity

  1. changed the title [-]bug: Swipe gestures break with Ionic React Router on certain parameterized route changes [/-] [+]bug: Swipe back gesture breaks with Ionic React Router on certain parameterized route changes [/+] on Jul 31, 2023
  2. added
    ionitron: needs reproduction
    on Aug 1, 2023
  3. ionitron-bot commented on Aug 1, 2023

    @ionitron-bot

    Thanks for the issue! This issue has been labeled as needs reproduction. This label is added to issues that need a code reproduction.

    Please reproduce this issue in an Ionic starter application and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.

    If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue.

    For a guide on how to create a good reproduction, see our Contributing Guide.

  4. aeharding commented on Aug 1, 2023

    @aeharding
    ContributorAuthor

    Reproductions added!

  5. added and removed
    ionitron: needs reproduction
    on Aug 2, 2023
  6. thetaPC commented on Sep 13, 2023

    @thetaPC
    Contributor

    Thank you for reporting the issue! I was able to reproduce the bug on both reproductions.

  7. added
    type: bug
    on Sep 13, 2023
  8. added
    type: bug
    and removed
    type: bug
    on Sep 13, 2023
  9. nicolae536 commented on Sep 25, 2023

    @nicolae536

    We also experience this issue 🤔 @thetaPC when will the fix arrive ?

  10. thetaPC commented on Sep 25, 2023

    @thetaPC
    Contributor

    The team is looking into the issue. Once a fix is implemented, then an update will be given here. I would recommend subscribing to the PR. Thank you!

  11. mhryshkin commented on Oct 7, 2023

    @mhryshkin

    aeharding
    I'm not sure if the weird behavior of the swipe back is related to this issue, but I couldn't find anything more applicable. Here's the code I'm working with:

    <IonRouterOutlet>
        <Route path="/app" render={() => <AppTabs />} />
        <Route
            exact
            path="/nested/:id"
            render={() => ...}
        />
    </IonRouterOutlet>

    The AppTabs component contains IonTabs with another IonRouterOutlet. The problem I'm facing is that on the first load of the app, if the content of the tab performs router.push('/nested/anyId'), the back swipe of the nested page doesn't work. Interestingly, if I click on the IonBackButton in the header and then try to repeat the process, the back swipe does work for some reason.

  12. cuvant commented on Feb 19, 2024

    @cuvant

    Hi there, I wanted to ask if there are any updates on this side. I was able to reproduce this behavior within one of our apps.

    Using IonBackButton all works as expected but the swipe gesture breaks the whole flow.

  13. pjlsergeant commented on May 2, 2024

    @pjlsergeant

    Is it possible to disable the swipe gesture? I have users complaining about this bug, and it doesn't look like a fix is imminent

  14. Roberto4091 commented on Sep 19, 2024

    @Roberto4091

    @pjlsergeant Hi! when configure the app in md mode the swipe gesture is disable
    setupIonicReact({ mode: 'md' });

  15. nadavhalfon commented on Feb 14, 2025

    @nadavhalfon

    any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bug

    Type

    Fields

    Stage

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions