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

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

Issue 1513353002: Fix speech flushing on Aura platforms in compat mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 8f20f28be389e6e3d2b07a8db823e0733e3c3955..4237af5815ff39b8b482defe7fae6f684e070cd6 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
@@ -141,10 +141,17 @@ DesktopAutomationHandler.prototype = {
node = node.find({state: {focused: true}}) || node;
}
- if (this.isEditable_(evt.target))
- this.createEditableTextHandlerIfNeeded_(evt.target);
+ if (this.isEditable_(node))
+ this.createEditableTextHandlerIfNeeded_(node);
- this.onEventDefault({target: node, type: 'focus'});
+ // Since we queue output mostly for live regions support and there isn't a
+ // reliable way to know if this focus event resulted from a user's explicit
+ // action, only flush when the focused node is not web content.
+ if (node.root.role == RoleType.desktop)
+ Output.flushNextSpeechUtterance();
+
+ this.onEventDefault(
+ {target: node, type: chrome.automation.EventType.focus});
},
/**

Powered by Google App Engine
This is Rietveld 408576698