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

extension stops the URL from being updated #12

Closed
moloko opened this issue Mar 16, 2017 · 5 comments
Closed

extension stops the URL from being updated #12

moloko opened this issue Mar 16, 2017 · 5 comments

Comments

@moloko
Copy link
Contributor

moloko commented Mar 16, 2017

if you're on a page and you get the prompt, clicking 'Yes' will navigate to the new location but leave the location.hash unchanged i.e. if you're on co-05, click the menu button, click 'yes' on the prompt then you'll be returned to the menu but the URL will remain "index.html#/id/co-05" - but it should change to "index.html#/"

@moloko
Copy link
Contributor Author

moloko commented Mar 17, 2017

OK through a bit of trial and error I have figured out that if I remove the final line of code - this.handleRoute.apply(this, args); - from the function navigateToArguments in router.js then it appears to fix this... but I'm a bit wary of doing this without really understanding the impact of this change... @oliverfoster could you offer any advice here?

@oliverfoster
Copy link
Member

I'd say this behaviour all need rewriting and thinking out properly. It's just a horrible mess of circular hacks.

@moloko
Copy link
Contributor Author

moloko commented Mar 28, 2017

@oliverfoster pageIncompletePrompt or router.js?

@oliverfoster
Copy link
Member

oliverfoster commented Mar 28, 2017

Probably both. Mostly router.js

The idea of preHooking, stopping and then later resuming the routing is reasonable. Obviously either the arguments or the url hash need to be captured and there needs to be some sensible method of passing a route back into the router (window.location.href seems like a good candidate rather than passing arguments around).

Reverting or stopping a hash change in the browser history is a bit of a problem with the backbone router. Which is where all this daft code came from.

@moloko
Copy link
Contributor Author

moloko commented Sep 6, 2017

fixed in v2.0.5

@moloko moloko closed this as completed Sep 6, 2017
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