Chromium Code Reviews| 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 05b2009312576a97e48bd8d84413efacd2c26fbd..6f5d24ca154710ed1c949d1a12df3c75c185ebd1 100644 |
| --- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js |
| +++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js |
| @@ -135,10 +135,12 @@ Background.prototype = { |
| this.setChromeVoxMode(ChromeVoxMode.FORCE_NEXT); |
| }, |
| + /** @type {ChromeVoxMode} */ |
| get mode() { |
| return this.mode_; |
| }, |
| + /** @type {cursors.Range} */ |
| get currentRange() { |
| return this.currentRange_; |
| }, |
| @@ -595,7 +597,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_ || |
|
David Tseng
2015/11/17 19:06:25
this.currentRange_ &&
|
| + this.currentRange_.start.node.root.role == RoleType.desktop) |
| return; |
| this.disableClassicChromeVox_(); |