fix the control S to save a revision

pull/1238/merge
John McLear 2012-11-30 23:28:34 +00:00
parent a4c4d11cd4
commit 3dcbd8dd4e
1 changed files with 1 additions and 1 deletions

View File

@ -3612,7 +3612,7 @@ function Ace2Inner(){
}, 0);
specialHandled = true;
}
if ((!specialHandled) && isTypeForSpecialKey && keyCode == 83)
if ((!specialHandled) && isTypeForCmdKey && String.fromCharCode(which).toLowerCase() == "s" && (evt.metaKey || evt.ctrlKey)) /* Do a saved revision on ctrl S */
{
evt.preventDefault();
parent.parent.pad.collabClient.sendMessage({"type":"SAVE_REVISION"}); /* The parent.parent part of this is BAD and I feel bad.. It may break something */