Bug 859181 - Variables view closes immediately on first open, r=rcampbell

This commit is contained in:
Victor Porof 2013-04-10 02:05:09 +03:00
parent 0c47a6e7a9
commit 26ee1b2207

View File

@ -108,6 +108,14 @@ this.ViewHelpers = {
* The element representing the pane to toggle.
*/
togglePane: function VH_togglePane(aFlags, aPane) {
// Hiding is always handled via margins, not the hidden attribute.
aPane.removeAttribute("hidden");
// Add a class to the pane to handle min-widths, margins and animations.
if (!aPane.classList.contains("generic-toggled-side-pane")) {
aPane.classList.add("generic-toggled-side-pane");
}
// Avoid useless toggles.
if (aFlags.visible == !aPane.hasAttribute("pane-collapsed")) {
if (aFlags.callback) aFlags.callback();
@ -140,14 +148,6 @@ this.ViewHelpers = {
}
}
// Add a class to the pane to handle min-widths, margins and animations.
if (!aPane.classList.contains("generic-toggled-side-pane")) {
aPane.classList.add("generic-toggled-side-pane");
}
// Hiding is always handled via margins, not the hidden attribute.
aPane.removeAttribute("hidden");
// The "animated" attributes enables animated toggles (slide in-out).
if (aFlags.animated) {
aPane.setAttribute("animated", "");