| Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors.js
|
| diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors.js
|
| index af31d1710163a1a298ccdb96be15fd8a6ef05481..82dec9cf54646f73909d11158ed5ceca74dd3fbd 100644
|
| --- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors.js
|
| +++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors.js
|
| @@ -314,7 +314,7 @@
|
| * @return {boolean}
|
| */
|
| isValid: function() {
|
| - return this.node != null;
|
| + return !!this.node && !!this.node.root;
|
| }
|
| };
|
|
|
| @@ -555,13 +555,10 @@
|
| // Find the most common root.
|
| var uniqueAncestors = AutomationUtil.getUniqueAncestors(start, end);
|
| var mcr = start.root;
|
| - if (uniqueAncestors) {
|
| - var common = uniqueAncestors.pop().parent;
|
| - if (common)
|
| - mcr = common.root;
|
| - }
|
| -
|
| - if (!mcr || mcr.role == RoleType.desktop)
|
| + if (uniqueAncestors)
|
| + mcr = uniqueAncestors.pop().parent.root;
|
| +
|
| + if (mcr.role == RoleType.desktop)
|
| return;
|
|
|
| if (mcr === start.root && mcr === end.root) {
|
|
|