Merge pull request #2621 from ether/fix-dead-keys

first attempt at fixing dead keys, it cant be this easy can it?
This commit is contained in:
John McLear 2015-05-07 16:57:43 +01:00
commit 74071dc066
1 changed files with 6 additions and 1 deletions

View File

@ -3681,6 +3681,11 @@ function Ace2Inner(){
stopped = true;
}
}
else if (evt.key === "Dead"){
// If it's a dead key we don't want to do any Etherpad behavior.
stopped = true;
return true;
}
else if (type == "keydown")
{
outsideKeyDown(evt);
@ -3885,7 +3890,7 @@ function Ace2Inner(){
toggleAttributeOnSelection('underline');
specialHandled = true;
}
if ((!specialHandled) && isTypeForCmdKey && String.fromCharCode(which).toLowerCase() == "5" && (evt.metaKey || evt.ctrlKey))
if ((!specialHandled) && isTypeForCmdKey && String.fromCharCode(which).toLowerCase() == "5" && (evt.metaKey || evt.ctrlKey) && evt.altKey !== true)
{
// cmd-5 (strikethrough)
fastIncorp(13);