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

Navigation.back generates two UrlChange events #102

Open
glasserc opened this issue Dec 31, 2019 · 2 comments
Open

Navigation.back generates two UrlChange events #102

glasserc opened this issue Dec 31, 2019 · 2 comments

Comments

@glasserc
Copy link

STR:

Expected behavior:

A single UrlChanged message should appear with /profile as the URL

Actual behavior:

Two UrlChanged messages are produced: first /reviews/the-century-of-the-self and then /profile

I guess this is because of this call to key():

return A2(__Task_perform, __Basics_never, __Scheduler_binding(function() {
n && history.go(n);
key();
}));

Because the history API is asynchronous, the immediate call to key() will just send a message for the current page URL.

@AdrianoFerrari
Copy link

I tried to reproduce using your repo (to see if my current bug is related), but I wasn't able to. Both the browser back button, and the one you included in the view, work correctly for me (Chrome v 81).

Can someone else try to reproduce?
That way, we can know if it's still an issue, or if this can be closed.

@glasserc
Copy link
Author

glasserc commented Sep 7, 2020

I was just able to reproduce this issue on Chrome 84 as well as Firefox nightly (82.0a1 (2020-08-31)). Since the underlying code hasn't changed, I don't see any reason why this issue would no longer be present.

To make it easier to visualize the events and verify that the issue still exists, I added code to the reproduction case that keeps a history of all UrlChanged messages and displays them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants