Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1415)

Unified Diff: Source/devtools/front_end/elements/ElementsPanel.js

Issue 1315703002: DevTools: preserve selected sidebar tab when dynamically switching the layout. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/elements/ElementsPanel.js
diff --git a/Source/devtools/front_end/elements/ElementsPanel.js b/Source/devtools/front_end/elements/ElementsPanel.js
index dde173bfa2576aa126ad5c02248fac63bdf1e132..00ddd3142ed6c719a44567d6a826324c216224b1 100644
--- a/Source/devtools/front_end/elements/ElementsPanel.js
+++ b/Source/devtools/front_end/elements/ElementsPanel.js
@@ -967,6 +967,8 @@ WebInspector.ElementsPanel.prototype = {
if (this.sidebarPaneView && this.sidebarPaneView.shouldHideOnDetach())
return; // We can't reparent extension iframes.
+ var selectedTabId = this.sidebarPaneView ? this.sidebarPaneView.selectedTabId : null;
+
var extensionSidebarPanes = WebInspector.extensionServer.sidebarPanes();
if (this.sidebarPaneView) {
this.sidebarPaneView.detach();
@@ -1065,6 +1067,9 @@ WebInspector.ElementsPanel.prototype = {
this._splitWidget.setSidebarWidget(this.sidebarPaneView);
this.sidebarPanes.styles.expand();
+
+ if (selectedTabId)
+ this.sidebarPaneView.selectTab(selectedTabId);
},
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698