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

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

Issue 1621823003: Avoid getting stuck when calling focus() on iframe nodes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test. Created 4 years, 11 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 | chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 67b261f3cb7cbf9b8ea1f12397f8003f0e9a0343..f16ed4e390841f75882204e411f3c122b1a1a87f 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
@@ -500,7 +500,11 @@ Background.prototype = {
var actionNode = current.start.node;
if (actionNode.role == RoleType.inlineTextBox)
actionNode = actionNode.parent;
- actionNode.focus();
+
+ // Iframes, when focused, causes the child webArea to fire focus event.
+ // This can result in getting stuck when navigating backward.
+ if (actionNode.role != RoleType.iframe && !actionNode.state.focused)
+ actionNode.focus();
var prevRange = this.currentRange_;
this.setCurrentRange(current);
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698