Commit bea53220 authored by dtseng's avatar dtseng Committed by Commit bot

Fix reading of menus.

This broke because menuItems are not the descendants of the currently focused item.
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2028793002
Cr-Commit-Position: refs/heads/master@{#396959}
parent 9fb36edf
......@@ -365,8 +365,10 @@ DesktopAutomationHandler.prototype = {
chrome.automation.getFocus(function(focus) {
// Some cases (e.g. in overview mode), require overriding the assumption
// that focus is an ancestor of a selection target.
var override =
evt.target.root == focus.root && focus.root.role == RoleType.desktop;
var override = evt.target.role == RoleType.menuItem ||
(evt.target.root == focus.root &&
focus.root.role == RoleType.desktop);
Output.flushNextSpeechUtterance();
if (override || AutomationUtil.isDescendantOf(evt.target, focus))
this.onEventDefault(evt);
}.bind(this));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment