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

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

Issue 2948173004: Fix end of line announcements (Closed)
Patch Set: 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..a679a41658593bf09f3116bb4c41ca6c0d9dbfde 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing.js
@@ -391,9 +391,15 @@ 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, this state has very little meaning in most
dmazzoni 2017/06/23 18:31:45 I don't know what you mean by "this state has very
David Tseng 2017/06/23 19:17:07 It has little meaning because there's no character
+ // cases. Describe it as a new line. In braille, we simply show the cursor
+ // one cell to the right of the last character.
+ 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