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

Ignore focus events on role client nodes.

- switch tabs via ctrl+tab

result:
a node of role client triggers a focus event. It is a child of the toolbar in the desktop tree.

expected:
generic elements in the desktop tree like this one should not be focused.

Notes:
This focus event causes us to flip to compat temporarily but due to logic in TabsApiHandler, we switch right back to classic. However, since range was previously set to the client node (and compat flips off classic), we're stuck in a halfway state where classic mode is set but the content script was unloaded.

Review URL: https://codereview.chromium.org/1631663006

Cr-Commit-Position: refs/heads/master@{#371588}
parent c214961e
......@@ -130,8 +130,8 @@ DesktopAutomationHandler.prototype = {
var node = evt.target;
// Discard focus events on embeddedObject nodes.
if (node.role == RoleType.embeddedObject)
// Discard focus events on embeddedObject and client nodes.
if (node.role == RoleType.embeddedObject || node.role == RoleType.client)
return;
// It almost never makes sense to place focus directly on a rootWebArea.
......
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