From 1d7c9220ee8efccae435aa1912b075ba5039e54b Mon Sep 17 00:00:00 2001 From: Peter Xiao Date: Wed, 14 Aug 2013 13:29:34 -0700 Subject: [PATCH] No need to focus ace, add more expansions. --- lib/ace/ext/chromevox.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/ace/ext/chromevox.js b/lib/ace/ext/chromevox.js index 8c8656ef..5193fafa 100644 --- a/lib/ace/ext/chromevox.js +++ b/lib/ace/ext/chromevox.js @@ -304,6 +304,14 @@ var rules = { { substr: '>', newSubstr: ' tag end ' + }, + { + substr: '', + newSubstr: ' close tag ' } ] } @@ -876,7 +884,7 @@ var init = function(editor) { cvoxAce.editor.getSession().on('changeAnnotation', onAnnotationChange); cvoxAce.editor.on('changeStatus', onChangeStatus); cvoxAce.editor.on('findSearchBox', onFindSearchbox); - window.addEventListener('keydown', onKeyDown); + editor.container.addEventListener('keydown', onKeyDown); /* Assume we start in command mode if vim. */ if (isVimMode()) {