Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7197)

Unified Diff: chrome/browser/resources/chromeos/chromevox/chromevox/injected/initial_speech.js

Issue 1137403003: Fix ChromeVox's detection of whether the current document has focus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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(

Powered by Google App Engine
This is Rietveld 408576698