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

[jQuery] firefox, ESC key closes request #569

Closed
PavelR577 opened this issue Aug 21, 2012 · 8 comments
Closed

[jQuery] firefox, ESC key closes request #569

PavelR577 opened this issue Aug 21, 2012 · 8 comments

Comments

@PavelR577
Copy link

Used this fix (I think we can add it to the atmosphere JS by default)

jQuery(document).ready(function(){
jQuery(this).keypress(function(e){
        if(e.keyCode == 27){
            e.preventDefault();
        }
    });
});
@jfarcand
Copy link
Member

Nice catch. Thanks!

@blabno
Copy link

blabno commented Nov 14, 2013

This fix should be placed in atmosphere.js and not jquery.atmosphere.js.

@blabno
Copy link

blabno commented Nov 14, 2013

@jfarcand oh, thank you, but it doesn't work if I have jQuery loaded. I'm using pure atmosphere.js but I also have jQuery library loaded for some other stuff.

@flowersinthesand
Copy link
Member

Because event.which property is provided by jQuery.

event.which should be replaced with event.charCode != null ? event.charCode : event.keyCode and also event.preventDefault should be checked if it exists first since old IE doesn't have it.

I'll commit them.

@jfarcand
Copy link
Member

OK Thanks will play a little with it.

@flowersinthesand
Copy link
Member

The patch applies on the master branch from atmosphere-javascript.

Atmosphere/atmosphere-javascript@48e6a47

For your information, it is fixed in Firefox 20.

@jfarcand
Copy link
Member

Woa Thanks!!! I will port it to the branch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants