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

Add something to tell if action was backward or forward in listen function #676

Closed
tholander opened this issue Mar 14, 2019 · 1 comment
Closed

Comments

@tholander
Copy link

I'm trying to make breadcrumbs for an app, and wanted to distinguish goBack and goForward by the value of action parameter. But any call to go function returns a POP action.
Is it possible to add something in the listen function to distinguish if whether it's a goBack or goForward ?

@mjackson
Copy link
Member

The browser doesn't tell us whether the back or forward buttons were clicked, only that a POP happened. You can probably try doing something like saving some extra location state on each navigation with a counter, and then comparing the counter whenever you get a POP. But we don't have any plans to support something like that in core yet. It's definitely an interesting feature request though.

@lock lock bot locked as resolved and limited conversation to collaborators May 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants