do not trigger keyLocation warning (fixes #1731)
This commit is contained in:
parent
cdaf4c1539
commit
fb16e59f03
1 changed files with 3 additions and 2 deletions
|
|
@ -239,7 +239,7 @@ function normalizeCommandKeys(callback, e, keyCode) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (keyCode === 18 || keyCode === 17) {
|
if (keyCode === 18 || keyCode === 17) {
|
||||||
var location = e.location || e.keyLocation;
|
var location = "location" in e ? e.location : e.keyLocation;
|
||||||
if (keyCode === 17 && location === 1) {
|
if (keyCode === 17 && location === 1) {
|
||||||
ts = e.timeStamp;
|
ts = e.timeStamp;
|
||||||
} else if (keyCode === 18 && hashId === 3 && location === 2) {
|
} else if (keyCode === 18 && hashId === 3 && location === 2) {
|
||||||
|
|
@ -275,7 +275,8 @@ function normalizeCommandKeys(callback, e, keyCode) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hashId && keyCode === 13) {
|
if (!hashId && keyCode === 13) {
|
||||||
if (e.location || e.keyLocation === 3) {
|
var location = "location" in e ? e.location : e.keyLocation;
|
||||||
|
if (location === 3) {
|
||||||
callback(e, hashId, -keyCode);
|
callback(e, hashId, -keyCode);
|
||||||
if (e.defaultPrevented)
|
if (e.defaultPrevented)
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue