Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js |
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js |
index 4c04953b4c4de4423ef5c1fad28d83138dc4043f..8db4d02391c23ff7a623580b2cd259c9d992357b 100644 |
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js |
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js |
@@ -134,10 +134,12 @@ Background.prototype = { |
this.setChromeVoxMode(ChromeVoxMode.FORCE_NEXT); |
}, |
+ /** @type {ChromeVoxMode} */ |
get mode() { |
return this.mode_; |
}, |
+ /** @type {cursors.Range} */ |
get currentRange() { |
return this.currentRange_; |
}, |
@@ -606,7 +608,8 @@ Background.prototype = { |
} else { |
// When in compat mode, if the focus is within the desktop tree proper, |
// then do not disable content scripts. |
- if (this.currentRange_.start.node.root.role == 'desktop') |
+ if (this.currentRange_ && |
+ this.currentRange_.start.node.root.role == RoleType.desktop) |
return; |
this.disableClassicChromeVox_(); |