fix Ace on ChromeOS uses wrong keys for Home/End (#1950)

This commit is contained in:
nightwing 2014-05-15 19:58:03 +04:00
commit b6a5e222cd
2 changed files with 10 additions and 0 deletions

View file

@ -279,6 +279,14 @@ function normalizeCommandKeys(callback, e, keyCode) {
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
// we don't call the callback as we don't handle a command key here

View file

@ -101,4 +101,6 @@ exports.isIPad = ua.indexOf("iPad") >= 0;
exports.isTouchPad = ua.indexOf("TouchPad") >= 0;
exports.isChromeOS = ua.indexOf(" CrOS ") >= 0;
});