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

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

Issue 2960283002: Fix touch typing (Closed)
Patch Set: Updates after offline discussion. 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
« 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/cvox2/background/desktop_automation_handler.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js
index 96f26359575e5de61c10c744038f74faea562e2a..aa6c338f1d48ff2cd602c24442aed182fe224dea 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js
@@ -98,6 +98,13 @@ DesktopAutomationHandler.VMIN_VALUE_CHANGE_DELAY_MS = 500;
*/
DesktopAutomationHandler.announceActions = false;
+/**
+ * The url of the keyboard.
+ * @const {string}
+ */
+DesktopAutomationHandler.KEYBOARD_URL =
+ 'chrome-extension://jkghodnilhceideoidjikpgommlajknk/inputview.html';
+
DesktopAutomationHandler.prototype = {
__proto__: BaseAutomationHandler.prototype,
@@ -423,9 +430,13 @@ DesktopAutomationHandler.prototype = {
while (voxTarget && voxTarget.parent && voxTarget.parent.state.editable)
voxTarget = voxTarget.parent;
- // It is possible that ChromeVox has range over some other node
- // when a text field is focused.
- if (!target.state.focused || target != voxTarget)
+ // It is possible that ChromeVox has range over some other node when a text
+ // field is focused. Only allow this when focus is on a desktop node or
+ // ChromeVox is over the keyboard.
+ if (!target.state.focused ||
+ (target != voxTarget && target.root.role != RoleType.DESKTOP &&
+ voxTarget.root.url.indexOf(DesktopAutomationHandler.KEYBOARD_URL) !=
+ 0))
return;
this.createTextEditHandlerIfNeeded_(target);
« 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