| 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 84b6cdcd6f630af435e147ac8dd6665fb03b8f28..bafccde71b42f6697fd976cb259b42ee6912db70 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
|
| @@ -326,6 +326,21 @@ DesktopAutomationHandler.prototype = {
|
| }
|
|
|
| this.createTextEditHandlerIfNeeded_(evt.target);
|
| +
|
| + // Sync the ChromeVox range to the editable, if a selection exists.
|
| + var anchorObject = evt.target.root.anchorObject;
|
| + var anchorOffset = evt.target.root.anchorOffset;
|
| + var focusObject = evt.target.root.focusObject;
|
| + var focusOffset = evt.target.root.focusOffset;
|
| + if (anchorObject && focusObject) {
|
| + var selectedRange = new cursors.Range(
|
| + new cursors.WrappingCursor(anchorObject, anchorOffset),
|
| + new cursors.WrappingCursor(focusObject, focusOffset));
|
| +
|
| + // Sync ChromeVox range with selection.
|
| + ChromeVoxState.instance.setCurrentRange(selectedRange);
|
| + }
|
| +
|
| // TODO(plundblad): This can currently be null for contenteditables.
|
| // Clean up when it can't.
|
| if (this.textEditHandler_)
|
|
|