Chromium Code Reviews| 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) { |