| 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 db92e2e2b5a292d4403e12454d59703ca8014a2b..8b57e089303b6107dd79721e451e75429f5c7e74 100644
|
| --- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
|
| +++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
|
| @@ -766,37 +766,25 @@
|
| if (start.state.focused || end.state.focused)
|
| return;
|
|
|
| - var isFocusableLinkOrControl = function(node) {
|
| - return node.state.focusable &&
|
| - AutomationPredicate.linkOrControl(node);
|
| + // Iframes, when focused, causes the child webArea to fire focus
|
| + // event. This can result in getting stuck when navigating
|
| + // backward.
|
| + var isFocusable = function(node) {
|
| + return node.role != RoleType.iframe &&
|
| + node.state.focusable &&
|
| + !node.state.focused &&
|
| + !AutomationPredicate.structuralContainer(node);
|
| };
|
| -
|
| - // First, try to focus the start or end node.
|
| - if (isFocusableLinkOrControl(start)) {
|
| - if (!start.state.focused)
|
| - start.focus();
|
| + if (isFocusable(start)) {
|
| + start.focus();
|
| return;
|
| - } else if (isFocusableLinkOrControl(end)) {
|
| - if (!end.state.focused)
|
| - end.focus();
|
| + }
|
| + if (isFocusable(end)) {
|
| + end.focus();
|
| return;
|
| }
|
|
|
| - // If a common ancestor of |start| and |end| is a link, focus that.
|
| - var ancestor = AutomationUtil.getLeastCommonAncestor(start, end);
|
| - while (ancestor && ancestor.root == start.root) {
|
| - if (isFocusableLinkOrControl(ancestor)) {
|
| - if (!ancestor.state.focused)
|
| - ancestor.focus();
|
| - return;
|
| - }
|
| - ancestor = ancestor.parent;
|
| - }
|
| -
|
| - // If nothing is focusable, set the sequential focus navigation starting
|
| - // point, which ensures that the next time you press Tab, you'll reach
|
| - // the next or previous focusable node from |start|.
|
| - start.setSequentialFocusNavigationStartingPoint();
|
| + // TODO(dmazzoni): Set sequential focus.
|
| }
|
| };
|
|
|
|
|