Skip to content

Commit

Permalink
Fix for #569 [jQuery] firefox, ESC key closes request
Browse files Browse the repository at this point in the history
  • Loading branch information
jfarcand committed Aug 27, 2012
1 parent bb2477f commit fd0824d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/jquery/src/main/webapp/jquery/jquery.atmosphere.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ jQuery.atmosphere = function() {
jQuery.atmosphere.unsubscribe();
});

// Prevent ESC to kill the connection from Firefox.
jQuery(window).keypress(function(e){
if(e.keyCode == 27){
e.preventDefault();
}
});

var parseHeaders = function(headerString) {
var match, rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, headers = {};
while (match = rheaders.exec(headerString)) {
Expand Down

0 comments on commit fd0824d

Please sign in to comment.