| Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js
|
| diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js
|
| index d698bb099177025774d6970a6778a933a4395465..cc43b5a5ffe01c54f39c20de19507d0976b18b76 100644
|
| --- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js
|
| +++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js
|
| @@ -281,7 +281,10 @@ DesktopAutomationHandler.prototype = {
|
| */
|
| onFocus: function(evt) {
|
| // Invalidate any previous editable text handler state.
|
| - this.textEditHandler_ = null;
|
| + if (this.textEditHandler_) {
|
| + this.textEditHandler_.invalidate();
|
| + this.textEditHandler_ = null;
|
| + }
|
|
|
| var node = evt.target;
|
|
|
| @@ -480,7 +483,10 @@ DesktopAutomationHandler.prototype = {
|
| // Invalidate any previous editable text handler state since some nodes,
|
| // like menuitems, can receive selection while focus remains on an editable
|
| // leading to braille output routing to the editable.
|
| - this.textEditHandler_ = null;
|
| + if (this.textEditHandler_) {
|
| + this.textEditHandler_.invalidate();
|
| + this.textEditHandler_ = null;
|
| + }
|
|
|
| chrome.automation.getFocus(function(focus) {
|
| // Desktop tabs get "selection" when there's a focused webview during tab
|
| @@ -535,6 +541,9 @@ DesktopAutomationHandler.prototype = {
|
| createTextEditHandlerIfNeeded_: function(node) {
|
| if (!this.textEditHandler_ ||
|
| this.textEditHandler_.node !== node) {
|
| + if (this.textEditHandler_)
|
| + this.textEditHandler_.invalidate();
|
| +
|
| this.textEditHandler_ = editing.TextEditHandler.createForNode(node);
|
| }
|
| },
|
|
|