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

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

Issue 2104663003: Prepare ChromeVox for webstore release. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix key maps. Created 4 years, 6 months 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
Index: chrome/browser/resources/chromeos/chromevox/chromevox/background/prefs.js
diff --git a/chrome/browser/resources/chromeos/chromevox/chromevox/background/prefs.js b/chrome/browser/resources/chromeos/chromevox/chromevox/background/prefs.js
index 0e07a87572fe7f65e0f600ed4d84e0733f193acd..eaeb939e9e8b395aa7e6ef4c2e8c99c8d1651bf2 100644
--- a/chrome/browser/resources/chromeos/chromevox/chromevox/background/prefs.js
+++ b/chrome/browser/resources/chromeos/chromevox/chromevox/background/prefs.js
@@ -108,6 +108,12 @@ cvox.ChromeVoxPrefs.prototype.init = function(pullFromLocalStorage) {
* cvox.KeyMap.AVAIABLE_KEYMAP_INFO.
*/
cvox.ChromeVoxPrefs.prototype.switchToKeyMap = function(selectedKeyMap) {
+ // 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 = [];
+
// TODO(dtseng): Leaking state about multiple key maps here until we have a
// class to manage multiple key maps.
localStorage['currentKeyMap'] = selectedKeyMap;

Powered by Google App Engine
This is Rietveld 408576698