Commit bb1a4687 authored by Erik Luo's avatar Erik Luo Committed by Commit Bot

DevTools: do not highlight selected node on DevTools focus

Switching windows or using the Element picker may focus the DevTools
area with relatedTarget=null. In these cases, re-applying node
highlight is not needed.

Bug: 905252
Change-Id: Ie3ae228c9cc404f16598ff428d9e593bb90e33e5
Reviewed-on: https://chromium-review.googlesource.com/c/1336910
Commit-Queue: Andrey Lushnikov <lushnikov@chromium.org>
Reviewed-by: default avatarAndrey Lushnikov <lushnikov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608541}
parent 5101205d
......@@ -550,6 +550,7 @@ Elements.ElementsTreeOutline = class extends UI.TreeOutline {
const listItem = event.target.enclosingNodeOrSelfWithNodeName('li');
if (!listItem || !listItem.treeElement || !listItem.treeElement.selected)
return;
if (event.relatedTarget)
this._highlightTreeElement(/** @type {!UI.TreeElement} */ (listItem.treeElement), true /* showInfo */);
}
......
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