fix Ace on ChromeOS uses wrong keys for Home/End (#1950)
This commit is contained in:
parent
ea07bfb4e7
commit
b6a5e222cd
2 changed files with 10 additions and 0 deletions
|
|
@ -279,6 +279,14 @@ function normalizeCommandKeys(callback, e, keyCode) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (useragent.isChromeOS && hashId & 8) {
|
||||||
|
callback(e, hashId, keyCode);
|
||||||
|
if (e.defaultPrevented)
|
||||||
|
return;
|
||||||
|
else
|
||||||
|
hashId &= ~8;
|
||||||
|
}
|
||||||
|
|
||||||
// If there is no hashId and the keyCode is not a function key, then
|
// If there is no hashId and the keyCode is not a function key, then
|
||||||
// we don't call the callback as we don't handle a command key here
|
// we don't call the callback as we don't handle a command key here
|
||||||
|
|
|
||||||
|
|
@ -101,4 +101,6 @@ exports.isIPad = ua.indexOf("iPad") >= 0;
|
||||||
|
|
||||||
exports.isTouchPad = ua.indexOf("TouchPad") >= 0;
|
exports.isTouchPad = ua.indexOf("TouchPad") >= 0;
|
||||||
|
|
||||||
|
exports.isChromeOS = ua.indexOf(" CrOS ") >= 0;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue