Skip to content

goBackN()? #765

@Zinggi

Description

@Zinggi

I do have a site where you can open a popup. From this popup you can navigate deeper.
I mapped all those subpages of the popup to the url and that works great.

What I want to do now is close this popup, e.g. navigate a certain amount of steps back.

I implemented goBackN(n) myself by just calling goBack() n times.
This works on chrome, but not on android and ios. There it only goes back once, ignoring the repeated calls.

transitionTo(...) doesn't work either in my case, see illustration below:

app/foo
app/foo/popup      #open popup
app/foo/popup/1    #navigate deeper
app/foo/popup/1/2  #navigate deeper
app/foo            #close the popup using transitionTo('foo')
app/foo/popup/1/2  #user pressed browser back button, NOT what I want
                   #correct would be: "app"

What other options do I have? Can I use transitionTo(...) and then directly modify the history somehow?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions