Commit 1fdf0702 authored by Joel Einbinder's avatar Joel Einbinder Committed by Commit Bot

DevTools: Don't collapse a folder if it has focus on rebind

We shouldn't mess with the folder structure while the user is inside
it. They might be crushed.

Bug: none
Change-Id: Iaa03fc58d2992d849b3fc097747549e938c7761d
Reviewed-on: https://chromium-review.googlesource.com/821560Reviewed-by: default avatarAndrey Lushnikov <lushnikov@chromium.org>
Commit-Queue: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523545}
parent 18126c18
......@@ -1634,6 +1634,8 @@ Sources.NavigatorGroupTreeNode = class extends Sources.NavigatorTreeNode {
if (wasActive === isActive)
return;
this._treeElement.listItemElement.classList.toggle('has-mapped-files', isActive);
if (this._treeElement.childrenListElement.hasFocus())
return;
if (isActive)
this._treeElement.expand();
else
......
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