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

Browser Back Button functionality broken after login #37

Open
vpopa22 opened this issue Apr 4, 2019 · 2 comments
Open

Browser Back Button functionality broken after login #37

vpopa22 opened this issue Apr 4, 2019 · 2 comments
Assignees
Labels
bug Something isn't working need-more-info Need more info to investigate

Comments

@vpopa22
Copy link

vpopa22 commented Apr 4, 2019

Please describe the issue in as many details as possible.

cc @t1gor

Versions:

  • npm -v: 5.8.0
  • node -v: 8.11.4
  • vxpay-js: 2.6.2
  • you can find the last one by running npm list vxpay-js --depth=0

Problem

After login is performed i would like to navigate via the browser back button to the previous page and failed to do so.

Details....

It appears that there is an event listener on beforeUnload that does not get unset after login is performed. This completely breaks the expected browser behavior

Possible solutions

Find the listeners and remove them after login is done.

Vlad@vxpages team

Thx !

@t1gor t1gor added the bug Something isn't working label Apr 22, 2019
@t1gor t1gor self-assigned this Apr 22, 2019
@t1gor
Copy link
Collaborator

t1gor commented Apr 22, 2019

After a short investigation, I can only say that:

  • this seems to be happening due to VXPay frame participating in the navigation (e.g. if you open login screen and decide to change for registration or lost password)
  • this behavior is not consistent - some times it allows back navigation by the back btn, some times the iframe only sends postMessage {"type":"modalbox-hook","data":{"hook":"login"}

@maddockman could you please let us know if this is a desired behavior?

@t1gor t1gor added the need-more-info Need more info to investigate label Apr 22, 2019
@maddockman
Copy link
Contributor

There's a functionality in the VXPay frame, that prevents going back in some case. It should prevent to navigate back to the login or signup view, if the user is already logged in. So, it's a desired behaviour but it may be buggy, as mentioned in the cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need-more-info Need more info to investigate
Projects
None yet
Development

No branches or pull requests

3 participants