Permalink
Browse files

prevent firefox default save dialog for keyboard shortcuts

  • Loading branch information...
1 parent c6f92a6 commit 15ae4a0343146fb820bac372f009bd20e1db4678 @seanmonstar seanmonstar committed Feb 14, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 media/jetpack/js/ide/controllers/PackageController.js
@@ -1510,10 +1510,10 @@ module.exports = new Class({
}
});
- // to prevent ctrl+n opening a new window
+ // to prevent Firefox's default shortcuts
// keyup is too late
dom.document.addListener('keypress', function(e) {
- if (e.key === 'n' && e.control) {
+ if (e.control && (e.key === 'n'|| e.key === 's')) {
e.preventDefault();
}
});

0 comments on commit 15ae4a0

Please sign in to comment.