Command+N not working in Chrome #172

jeremypbeasley opened this Issue Nov 13, 2013 · 3 comments


None yet

2 participants


Not sure why but this command is not working at all in Chrome. Works perfectly in Safari and Firefox with the below code.

Any help?

Mousetrap.bind(['command+n'], function(e) {
if (e.preventDefault) {
} else {
// internet explorer
e.returnValue = false;
$( "#settings" ).toggle();


This is because command+n in Chrome is the browser default for opening a new window. The Chrome UI team probably decided that this behavior shouldn't be allowed to be overridden. The same thing happens with command+shift+n (new incognito window) and command+t (new tab).

There is nothing I can do about this. You could try filing a bug at, but I'm not sure it is something they will change. It is not really a good practice to overwrite the default browser behaviors anyway. Perhaps try something like ctrl+n instead?

@ccampbell ccampbell closed this Nov 14, 2013

I totally get it and I would say in general it would not be a good practice but in the case of my note taking writing web app, the argument could be that it's justified. Thanks for confirming though!


Ya I mean Chrome definitely takes a different stance here than the other browsers so feel free to open a ticket with them about it. You can test by just doing

document.addEventListener('keydown', function(e) {
}, false);

And you will see when you press command+n nothing gets logged. So basically it doesn't fire any event at all.

If you do open a ticket please comment on this one with a link. Thanks!

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