mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-13 01:54:52 +08:00
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: Andrey Lushnikov <lushnikov@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#608541} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: bb1a4687d53112eba231613f92d018c116850eaf
This commit is contained in:
@@ -550,7 +550,8 @@ Elements.ElementsTreeOutline = class extends UI.TreeOutline {
|
||||
const listItem = event.target.enclosingNodeOrSelfWithNodeName('li');
|
||||
if (!listItem || !listItem.treeElement || !listItem.treeElement.selected)
|
||||
return;
|
||||
this._highlightTreeElement(/** @type {!UI.TreeElement} */ (listItem.treeElement), true /* showInfo */);
|
||||
if (event.relatedTarget)
|
||||
this._highlightTreeElement(/** @type {!UI.TreeElement} */ (listItem.treeElement), true /* showInfo */);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user