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

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

Issue 2450093002: Read the selected text explicitly when focusing a texdt field (Closed)
Patch Set: Created 4 years, 2 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/background.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
index 9c06328cc2428098cc4c9e5cb0989e5c66094060..461441207606fca2118ca47a2fa5ee0f0275d221 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
@@ -489,7 +489,14 @@ Background.prototype = {
this.pageSel_.select();
}
} else {
- range.select();
+ // Ensure we don't select the editable when we first encounter it.
+ var lca = null;
+ if (range.start.node && prevRange.start.node) {
+ lca = AutomationUtil.getLeastCommonAncestor(prevRange.start.node,
+ range.start.node);
+ }
+ if (!lca || lca.state.editable || !range.start.node.state.editable)
+ range.select();
}
o.withRichSpeechAndBraille(

Powered by Google App Engine
This is Rietveld 408576698