Index: Source/devtools/front_end/ui/View.js |
diff --git a/Source/devtools/front_end/ui/View.js b/Source/devtools/front_end/ui/View.js |
index 95b55ca3d40dfb1b1c55e9d38725971afe634b95..604134c8599f90496abdfb8d0d5cf88c53e458f0 100644 |
--- a/Source/devtools/front_end/ui/View.js |
+++ b/Source/devtools/front_end/ui/View.js |
@@ -102,6 +102,20 @@ WebInspector.View.prototype = { |
return this._isShowing; |
}, |
+ /** |
+ * @return {boolean} |
+ */ |
+ _shouldHideOnDetach: function() |
+ { |
+ if (this._hideOnDetach) |
+ return true; |
+ for (var child of this._children) { |
+ if (child._shouldHideOnDetach()) |
+ return true; |
+ } |
+ return false; |
+ }, |
+ |
setHideOnDetach: function() |
{ |
this._hideOnDetach = true; |
@@ -268,7 +282,7 @@ WebInspector.View.prototype = { |
if (this._parentIsShowing()) |
this._processWillHide(); |
- if (this._hideOnDetach && !overrideHideOnDetach) { |
+ if (!overrideHideOnDetach && this._shouldHideOnDetach()) { |
this.element.classList.remove("visible"); |
this._visible = false; |
if (this._parentIsShowing()) |