Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2556)

Unified Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js

Issue 1459263002: Reset the list of sequence switch key codes when switching key maps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
index 4c04953b4c4de4423ef5c1fad28d83138dc4043f..8733b090b955fda447d205b7be08418463c699aa 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
@@ -581,6 +581,11 @@ Background.prototype = {
* defaults to false.
*/
setChromeVoxMode: function(mode, opt_injectClassic) {
+ // Switching key maps potentially affects the key codes that involve
+ // sequencing. Without resetting this list, potentially stale key codes
+ // remain. The key codes themselves get pushed in
+ // cvox.KeySequence.deserialize which gets called by cvox.KeyMap.
+ cvox.ChromeVox.sequenceSwitchKeyCodes = [];
if (mode === ChromeVoxMode.CLASSIC || mode === ChromeVoxMode.COMPAT)
cvox.ChromeVoxKbHandler.handlerKeyMap = cvox.KeyMap.fromDefaults();
else
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698