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

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

Issue 2757623003: Initial support for accessible text fields and focus tracking in ARC++ (Closed)
Patch Set: Created 3 years, 9 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 a981fc54ae4aacf0750a6785f8e35bb183143d9c..2d5f7b7da8a02738d3d16830d09f211743605b68 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
@@ -396,10 +396,14 @@ DesktopAutomationHandler.prototype = {
*/
onEditableChanged_: function(evt) {
var topRoot = AutomationUtil.getTopLevelRoot(evt.target);
- if (!evt.target.state.focused ||
- (topRoot &&
- topRoot.parent &&
- !topRoot.parent.state.focused))
+ if (topRoot && topRoot.parent && !topRoot.parent.state.focused)
+ return;
+
+ // Only process editable text events if either system or ChromeVox focus is
dmazzoni 2017/03/17 03:22:37 I think this might break contenteditable if the se
David Tseng 2017/03/17 15:38:32 Yeah, I think you're right. The issue is that on A
+ // on the target.
+ if (!evt.target.state.focused &&
+ (!ChromeVoxState.instance.currentRange ||
+ ChromeVoxState.instance.currentRange.start.node != evt.target))
return;
if (!ChromeVoxState.instance.currentRange) {

Powered by Google App Engine
This is Rietveld 408576698