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

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

Issue 2273133002: Use children changed events to monitor active descendant changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/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 bafccde71b42f6697fd976cb259b42ee6912db70..0b1380b8a34ebc8876addab98f770a5f94da5093 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
@@ -47,6 +47,7 @@ DesktopAutomationHandler = function(node) {
this.addListener_(e.alert, this.onAlert);
this.addListener_(e.ariaAttributeChanged, this.onEventIfInRange);
this.addListener_(e.checkedStateChanged, this.onCheckedStateChanged);
+ this.addListener_(e.childrenChanged, this.onActiveDescendantChanged);
this.addListener_(e.focus, this.onFocus);
this.addListener_(e.hover, this.onHover);
this.addListener_(e.loadComplete, this.onLoadComplete);
@@ -178,7 +179,7 @@ DesktopAutomationHandler.prototype = {
* @param {!AutomationEvent} evt
*/
onActiveDescendantChanged: function(evt) {
- if (!evt.target.activeDescendant)
+ if (!evt.target.activeDescendant || !evt.target.state.focused)
return;
this.onEventDefault(new chrome.automation.AutomationEvent(
EventType.focus, evt.target.activeDescendant));
« 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