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

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

Issue 1326363002: Reinstantiate EditableTextHandler instance on focus change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« 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 ebf1edca6e2e73fd595ca8137fce54584440b7d6..c6ecd94ded64426a43adce8819991930e7debe5d 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
@@ -453,6 +453,9 @@ Background.prototype = {
* @param {Object} evt
*/
onFocus: function(evt) {
+ // Invalidate any previous editable text handler state.
+ this.editableTextHandler = null;
+
var node = evt.target;
// It almost never makes sense to place focus directly on a rootWebArea.
@@ -545,6 +548,10 @@ Background.prototype = {
textChangeEvent.end,
evt.target.state['protected'],
cvox.ChromeVox.tts);
+
+ // Ignore the first text selection changed event which gets fired after
dmazzoni 2015/09/10 18:46:41 This shouldn't be necessary once https://coderevie
+ // the focus event.
+ return;
}
this.editableTextHandler.changed(textChangeEvent);
« 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