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

Firefox accepts any key after back-button, if callback had loaded a new page #42

Closed
mspreij opened this issue Dec 12, 2012 · 1 comment

Comments

@mspreij
Copy link

mspreij commented Dec 12, 2012

I have this code:

KeyboardJS.on('e', function() {
  location.href = location.href.replace('a=view', 'a=edit');
});

This works well - it loads the edit page.

But if I then hit the backbutton instead of submitting the edit form (or clicking any other link on that page), the same function is then run on pressing any other regular key (characters, numbers, punctuation etc), not just 'e'.

This happens in Firefox 17.0.1 on OS X (ML) and Ubuntu.
Safari and Chrome work as expected on OS X, and Chromium on Ubuntu too, so it's a FF issue, looks like?

@RobertWHurst
Copy link
Owner

This has to do with firefox caching the JS state of the previous page. Its an annoying thing that they've done for a long time I believe. I don't think its fixable. If I find time I'll reopen this bug and see if I can find some sort of solution.

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