Skip to content

Commit

Permalink
Bug 1287413 - Avoid blank area in the Sidebar. r=pbro
Browse files Browse the repository at this point in the history
  • Loading branch information
janodvarko committed Jul 21, 2016
1 parent 7bdf03a commit f2fa0dd
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions devtools/client/inspector/inspector-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -1229,21 +1229,17 @@ InspectorPanel.prototype = {
onPaneToggleButtonActivated: function (e) {
let sidePaneContainer = this.panelDoc.querySelector("#inspector-sidebar-container");
let isVisible = !this._sidebarToggle.state.collapsed;
let sidePane = this.panelDoc.querySelector(
"#inspector-sidebar .devtools-sidebar-tabs");

// Make sure the sidebar has width and height attributes before collapsing
// because ViewHelpers needs it.
if (isVisible) {
let rect = sidePaneContainer.getBoundingClientRect();
if (!sidePaneContainer.hasAttribute("width")) {
sidePaneContainer.setAttribute("width", rect.width);
sidePane.style.width = rect.width + "px";
}
// always refresh the height attribute before collapsing, it could have
// been modified by resizing the container.
sidePaneContainer.setAttribute("height", rect.height);
sidePane.style.height = rect.height + "px";
}

let onAnimationDone = () => {
Expand Down

0 comments on commit f2fa0dd

Please sign in to comment.