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

Unified Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js

Issue 2585943002: Make helpful announcement when there's no focus (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js
index 9f70869aa418c9a578c65ffd9e8add53461ed4f0..3ae083c2eae0c3b9431e39c82eaaecaace0ab395 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js
@@ -195,8 +195,11 @@ CommandHandler.onCommand = function(command) {
}
// Require a current range.
- if (!ChromeVoxState.instance.currentRange_)
- return true;
+ if (!ChromeVoxState.instance.currentRange_ ||
+ !ChromeVoxState.instance.currentRange_.isValid()) {
+ cvox.ChromeVox.tts.speak(Msgs.getMsg('no_focus'), cvox.QueueMode.FLUSH);
+ return false;
+ }
// Next/classic compat commands hereafter.
if (ChromeVoxState.instance.mode == ChromeVoxMode.CLASSIC ||
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698