vendor/assets/javascripts/ace/ext-chromevox.js in ace-rails-ap-4.0.1 vs vendor/assets/javascripts/ace/ext-chromevox.js in ace-rails-ap-4.0.2

- old
+ new

@@ -286,17 +286,17 @@ if (cvoxAce.editor.selection.isEmpty()) { cvox.Api.speak('unselected'); } }; var onChange = function(delta) { - switch (data.action) { + switch (delta.action) { case 'remove': - cvox.Api.speak(data.text, 0, DELETED_PROP); + cvox.Api.speak(delta.text, 0, DELETED_PROP); changed = true; break; case 'insert': - cvox.Api.speak(data.text, 0); + cvox.Api.speak(delta.text, 0); changed = true; break; } }; var isNewAnnotation = function(annot) { @@ -477,11 +477,11 @@ func: focus, cmd: Command.FOCUS_TEXT, desc: 'Focus text' } ]; -var onFocus = function() { +var onFocus = function(_, editor) { cvoxAce.editor = editor; editor.getSession().selection.on('changeCursor', onCursorChange); editor.getSession().selection.on('changeSelection', onSelectionChange); editor.getSession().on('change', onChange); editor.getSession().on('changeAnnotation', onAnnotationChange); @@ -490,10 +490,10 @@ editor.container.addEventListener('keydown', onKeyDown); lastCursor = editor.selection.getCursor(); }; var init = function(editor) { - onFocus(); + onFocus(null, editor); SHORTCUTS.forEach(function(shortcut) { keyCodeToShortcutMap[shortcut.keyCode] = shortcut; cmdToShortcutMap[shortcut.cmd] = shortcut; }); \ No newline at end of file