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); |