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

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

Issue 2948173004: Fix end of line announcements (Closed)
Patch Set: Remove comment. Created 3 years, 6 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/cvox2/background/editing.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing.js
index 4a729cbc796c57e6e57fc24d73607204c2235fb2..fdaae35208ca355be84628daa4f8b443a57c98d6 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing.js
@@ -391,9 +391,13 @@ AutomationRichEditableText.prototype = {
/** @override */
describeSelectionChanged: function(evt) {
- // Ignore end of text announcements.
- if ((this.start + 1) == evt.start && evt.start == this.value.length)
+ // Note that since Chrome allows for selection to be placed immediately at
+ // the end of a line (i.e. end == value.length) and since we try to describe
+ // the character to the right, just describe it as a new line.
+ if ((this.start + 1) == evt.start && evt.start == this.value.length) {
+ this.speak('\n', evt.triggeredByUser);
return;
+ }
cvox.ChromeVoxEditableTextBase.prototype.describeSelectionChanged.call(
this, evt);

Powered by Google App Engine
This is Rietveld 408576698