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

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

Issue 2813743002: Switch to selected 8-dot braille table in email and url text fields (Closed)
Patch Set: Created 3 years, 8 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/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);
}
},

Powered by Google App Engine
This is Rietveld 408576698