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()) {