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

Unified Diff: chrome/browser/resources/chromeos/chromevox/host/chrome/tts_background.js

Issue 1762843002: Fix logic handling empty strings in tts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/chromevox/host/chrome/tts_background.js
diff --git a/chrome/browser/resources/chromeos/chromevox/host/chrome/tts_background.js b/chrome/browser/resources/chromeos/chromevox/host/chrome/tts_background.js
index 94376942a4745dbc7a8f5d386bfe57119d2cd52c..b972aa059b7f9775f3b14ce2f0726d4d3885daab 100644
--- a/chrome/browser/resources/chromeos/chromevox/host/chrome/tts_background.js
+++ b/chrome/browser/resources/chromeos/chromevox/host/chrome/tts_background.js
@@ -257,6 +257,8 @@ cvox.TtsBackground.prototype.speak = function(
// any speech very well. Handle empty and whitespace only strings (including
// non-breaking space) here to mitigate the issue somewhat.
if (/^[\s\u00a0]*$/.test(textString)) {
+ queueMode = cvox.QueueMode.FLUSH;
+
// We still want to callback for listeners in our content script.
if (properties['startCallback']) {
try {
@@ -270,9 +272,6 @@ cvox.TtsBackground.prototype.speak = function(
} catch (e) {
}
}
- if (queueMode === cvox.QueueMode.FLUSH) {
- this.stop();
- }
return this;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698