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

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

Issue 2826423003: Expand Chrome OS ARC support to create one tree source per package (Closed)
Patch Set: Fake out WMHelper Created 3 years, 7 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..4873e593f7b8681489fbdcd33e1eebff479fb536 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
@@ -51,6 +51,8 @@ DesktopAutomationHandler = function(node) {
this.onAriaAttributeChanged);
this.addListener_(EventType.AUTOCORRECTION_OCCURED,
this.onEventIfInRange);
+ this.addListener_(EventType.BLUR,
+ this.onBlur);
this.addListener_(EventType.CHECKED_STATE_CHANGED,
this.onCheckedStateChanged);
this.addListener_(EventType.CHILDREN_CHANGED,
@@ -243,6 +245,14 @@ DesktopAutomationHandler.prototype = {
new Output().withSpeechAndBraille(range, null, evt.type).go();
},
+ onBlur: function(evt) {
+ // Nullify focus if it no longer exists.
+ chrome.automation.getFocus(function(focus) {
+ if (!focus)
+ ChromeVoxState.instance.setCurrentRange(null);
+ });
+ },
+
/**
* Provides all feedback once a checked state changed event fires.
* @param {!AutomationEvent} evt

Powered by Google App Engine
This is Rietveld 408576698