Commit 9a2d66d2 authored by pfeldman@chromium.org's avatar pfeldman@chromium.org

DevTools: preserve selected sidebar tab when dynamically switching the layout.

BUG=521900

Review URL: https://codereview.chromium.org/1315703002

git-svn-id: svn://svn.chromium.org/blink/trunk@201256 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent f15aa760
......@@ -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);
},
/**
......
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