How can I prevent the firefox to prompt the save document popup window from ctr+s ?
var isCtrl = false;
$(document).keyup(function (e) {
if(e.which == 17) isCtrl=false;
}).keydown(function (e) {
if(e.which == 17) isCtrl=true;
if(e.which == 83 && isCtrl == true) {
alert('you pressed ctrl+s');
e.preventDefault();
e.stopPropagation();
return false;
}
});
Chrome does not prompt the save doc document which is perfect. How can I fix the firefox?