diff --git a/lib/ice-coder.js b/lib/ice-coder.js index 7c69683..34936ff 100644 --- a/lib/ice-coder.js +++ b/lib/ice-coder.js @@ -370,7 +370,7 @@ var ICEcoder = { if (tag=='a') {tagStart='a href=""';} cM.replaceSelection("<"+tagStart+">"+cM.getSelection()+""); } - if (tag=='a') {cM.setCursor({line:cM.getCursor().line,ch:cM.getCursor('start').ch+9})} + if (tag=='a') {cM.setCursor({line:cM.getCursor('start').line,ch:cM.getCursor('start').ch+9})} }, // ============== @@ -2022,6 +2022,11 @@ var ICEcoder = { top.ICEcoder.lineCommentToggle(); return false; + // ESC not in content area (Cancel all actions) + } else if(key==27 && area != "content") { + top.ICEcoder.cancelAllActions(); + return false; + // Any other key } else { return key;