Add keycode for Mac command key (on Chrome)
This commit is contained in:
parent
3ec495ce90
commit
3296aa1765
1 changed files with 2 additions and 2 deletions
|
@ -76,7 +76,7 @@
|
||||||
|
|
||||||
$(document).keydown(function(e) {
|
$(document).keydown(function(e) {
|
||||||
var keycode = e.keycode || e.which;
|
var keycode = e.keycode || e.which;
|
||||||
if(keycode == 17) {
|
if(keycode == 17 || keycode == 91) {
|
||||||
lastFocus = currentFocus;
|
lastFocus = currentFocus;
|
||||||
$('#password').focus().select();
|
$('#password').focus().select();
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
|
|
||||||
$(document).keyup(function(e) {
|
$(document).keyup(function(e) {
|
||||||
var keycode = e.keycode || e.which;
|
var keycode = e.keycode || e.which;
|
||||||
if(keycode == 17) {
|
if(keycode == 17 || keycode == 91) {
|
||||||
lastFocus.focus();
|
lastFocus.focus();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue