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

Popup and location.replace #188

Open
fantome opened this issue Feb 10, 2014 · 0 comments
Open

Popup and location.replace #188

fantome opened this issue Feb 10, 2014 · 0 comments

Comments

@fantome
Copy link

fantome commented Feb 10, 2014

Hi,

On my website I use popup window for user login. After login, I need to change the hash in my main window (without history).
So I do :

window.opener.$.address.history(false);
window.opener.$.address.value('new_hash');

In this case, jquery-addresse makes something similar like this :

window.opener.location.replace('#new_hash');

But location.replace doesn't simply replace the hash of the main window. It uses the location of current window (popup) like base. So it makes ths :

popup_location = window.location;
popup_location.hash = 'new_hash';
window.opener.location = popup_location;

Finaly I have, in my main window's location, popup location with #new_hash.

I try this on Chrome and firefox. I don't know if it's a browser's feature ou bug. But it's strange.

Thx

PS: My apologies for my bad english.

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

1 participant