Index: chrome/browser/resources/chromeos/chromevox/chromevox/injected/initial_speech.js |
diff --git a/chrome/browser/resources/chromeos/chromevox/chromevox/injected/initial_speech.js b/chrome/browser/resources/chromeos/chromevox/chromevox/injected/initial_speech.js |
index 3e13f57f4fc26924525accb82a321d2ed773bb94..fa1fcf63f9fcdb251ecaae8484e1331906046f95 100644 |
--- a/chrome/browser/resources/chromeos/chromevox/chromevox/injected/initial_speech.js |
+++ b/chrome/browser/resources/chromeos/chromevox/chromevox/injected/initial_speech.js |
@@ -62,7 +62,8 @@ cvox.InitialSpeech.speak = function() { |
// actually happens inside of NavigationManager.reset, which doesn't get |
// called until AbstractHost.onPageLoad, but we need to speak and braille the |
// initial node here. |
- if (document.hasFocus() && document.activeElement == document.body) { |
+ if (cvox.ChromeVox.documentHasFocus() && |
+ document.activeElement == document.body) { |
cvox.ChromeVox.navigationManager.syncToBeginning(); |
} |
@@ -74,7 +75,7 @@ cvox.InitialSpeech.speak = function() { |
} |
// If this iframe has focus, speak and braille the current focused element. |
- if (document.hasFocus()) { |
+ if (cvox.ChromeVox.documentHasFocus()) { |
if (!disableSpeak) { |
cvox.ChromeVoxEventSuspender.withSuspendedEvents(function() { |
cvox.ChromeVox.navigationManager.finishNavCommand( |