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

[metal-router] using window.onbeforeunload does not work for popstate events #65

Open
bryceosterhaus opened this issue May 16, 2018 · 1 comment

Comments

@bryceosterhaus
Copy link
Member

I tried to reproduce with just Senna.js and was unable to reproduce, so I think it is specific to metal-router.

Reproduction Steps

  1. Run demos
  2. Navigate around to a few pages
  3. Paste snippet in js console
    window.onbeforeunload = () => true
  4. Click on the "back" arrow in the browser

Expected Result
Browser prompts a warning that asks before going back

Actual Result
Does not navigate, JS error metal.js:9173 Uncaught TypeError: event.preventDefault is not a function

@diegonvs
Copy link
Collaborator

diegonvs commented May 24, 2018

I'd reproduced this behavior in senna examples and i think that is a senna issue. I'm working on this issue.

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